What a neat solution! Leaner even than the bitwise solution (even with that 0: , ... on there). Impressive. Please record it on the wiki.

-Dan

PS:  I cannot reproduce your timings:

   NB.   Work computer
   1000 ts 'GC1 15'
0.00137394 525312
   1000 ts 'GC3 15'
0.00252186 1.05299e6
   1000 ts 'GC6 15'
0.000665091 787264

   NB.  Home computer
   1000 ts 'GC1 15'
0.00102192 525312
   1000 ts 'GC3 15'
0.00233702 1.05299e6
   1000 ts 'GC6 15'
0.000322889 787264



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to