Hi Thomas, On my machine I get the following timings without the patch
cpu time cshift dim=1 0.490763009 cpu time do loop dim=1 5.57969809E-02 cpu time cshift dim=2 0.416319966 cpu time do loop dim=2 0.187106013 cpu time cshift dim=3 1.37362707 cpu time do loop dim=3 1.39690399 and cpu time cshift dim=1 0.166012987 cpu time do loop dim=1 5.48990071E-02 cpu time cshift dim=2 0.183587968 cpu time do loop dim=2 0.191835046 cpu time cshift dim=3 1.35024190 cpu time do loop dim=3 1.42215610 with the patch. Do you understand why cshift is so slow for dim=3? Thanks for working on this issue. Dominique PS See also pr45689.