Another interesting fact:

   ts 's2"1 A'
5.17538 1.68444e7

   ts 's2&.|: A'
0.989067 8.39698e7

   (s2&.|: -: s2"1) A
1


   9!:14''
j601/beta/2006-04-05/10:10


--- Oleg Kobchenko <[EMAIL PROTECTED]> wrote:

> --- bill lam <[EMAIL PROTECTED]> wrote:
> 
> > The scale x2 method for print preview works but its speed is very slow 
> > (already
> > grayscale), it needs about 5 secs to process and display one page. Every 
> > zoom-in
> > and zoom-out need another 5 secs. Is there any quicker method?
> 
> The slowest thing is the scale filter,
> which takes 3.4 sec or about 70% or more
> of total paint (on a 700 MHz PIII).
> 
>    ts=: 6!:2 , 7!:[EMAIL PROTECTED]
> 
>    A=. i.2400 2048   NB. double screen of 1200x1024
> 
>    av2=: _2&((+/ <[EMAIL PROTECTED] #)\)
> 
>    ts '16b010101*av2 av2&.|: 256| A'
> 3.47908 1.17607e8
> 
> Now we replace that with a new scaler, where all
> three improvements matter: placement of |:, delayed
> division and division by shift.
> 
>    s2=: _2&(+/\)
>    av2x2=: _2 (33 b.) [: s2&.|: s2
> 
>    ts '16b010101*av2x2 f. 256| A'
> 1.15549 9.23276e7
> 
> 3 times cumulative improvement.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to