[Jprogramming] a performance quirk

'Pascal Jasmin' via Programming programming at jsoftware.com
Mon Dec 28 18:48:58 UTC 2015


    timespacex '+:^:(2&|)"0 i.100000'
0.0292787 2.10074e6
  timespacex ']`+:@.(2&|)"0 i.100000'
0.00561727 7.08134e6

above code doubles odd numbers, and returns even numbers unchanged.


I've previously noticed that ^: seemd faster than ]`u at . ... but I guess not?


More information about the Programming mailing list