ENH: Minor performance optimizations to the new barrier layout code.
ENH: Minor performance optimizations to the new barrier layout code.

baidu-research/persistent-rnn,baidu-research/persistent-rnn,baidu-research/persistent-rnn,baidu-research/persistent-rnn