[Jprogramming] convert 0,1 coding to _1,1

Brian Schott schott.brian at gmail.com
Tue Dec 11 04:58:06 UTC 2012


   timespacex
6!:2 , 7!:2@]
   am =:_1& (I.@:-.@]})
   am2=: ((-&1) @ +:)
   amd=: <:@:+:
   aml=: _1 + +:
   d=: 2 6 50000?.@$ 2
   timespacex 'am"1 d'
0.011278 1.05535e7
   timespacex 'am2 d'
0.187884 8.39091e6
   timespacex 'amd d'
0.004365 1.6779e7
   timespacex 'aml d'
0.004874 1.67789e7

It looks like David's method is fastest and Peter's is most lean.
And Linda's method loses nothing relative to David's.


More information about the Programming mailing list