That is a good idea. The improvement should be around a factor of 10 in time and a factor of 2 in space.
----- Original Message ----- From: Oleg Kobchenko <[EMAIL PROTECTED]> Date: Friday, October 20, 2006 1:03 am Subject: [Jprogramming] Interger division, the faster one > I expected there'd be special code for (<[EMAIL PROTECTED]). Alas, > > 6!:2 '(i.1e6) % 256' > 0.0246238 > 6!:2 '(i.1e6) <[EMAIL PROTECTED] 256' > 0.208256 > 6!:2 '(i.1e6) <.@:% 256' > 0.236405 > > For powers of 2 there's still > > 6!:2 '_8 (33 b.) (i.1e6)' > 0.0162501 > ((i.1e6) <[EMAIL PROTECTED] 256) -: _8 (33 b.) (i.1e6) > 1 > > > Viewmat improvement > ~~~~~~~~~~~~~~~~~~~ > > Thus this change makes complex viewmat ~x3.5 faster. > > k=. <.256*x - <. x NB. both times > ... > mat=. _8(33 b.) (t *"2 k) + b (*"2) 256-k > ... > mat=. _8(33 b.) (t * k) + b * 256-k > ... > mat=. 256 #. mat ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
