Re: Code Feedback Wanted (Generating more garbage)
From: Kenny Tilton (ktilton_at_nyc.rr.com)
Date: 03/25/04
- Previous message: Pascal Costanza: "Re: SETQ vs SETF"
- In reply to: David Steuber: "Code Feedback Wanted (Generating more garbage)"
- Next in thread: Bulent Murtezaoglu: "Re: Code Feedback Wanted (Generating more garbage)"
- Reply: Bulent Murtezaoglu: "Re: Code Feedback Wanted (Generating more garbage)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Mar 2004 14:19:37 GMT
Avant:
> CL-USER> (time (mandelbrot-set :x -3/4 :zoom 2 :bitmap-width 640 :bitmap-height 640))
> (MANDELBROT-SET :X -3/4 :ZOOM 2 :BITMAP-WIDTH 640 :BITMAP-HEIGHT 640) took 126,626 milliseconds (126.626 seconds) to run.
> Of that, 87,830 milliseconds (87.830 seconds) were spent in user mode
> 32,520 milliseconds (32.520 seconds) were spent in system mode
> 6,276 milliseconds (6.276 seconds) were spent executing other OS processes.
> 24,051 milliseconds (24.051 seconds) was spent in GC.
> 2,252,959,120 bytes of memory allocated.
Apres:
> CL-USER> (time (mandelbrot-set :x -3/4 :zoom 2 :bitmap-width 640 :bitmap-height 640))
> (MANDELBROT-SET :X -3/4 :ZOOM 2 :BITMAP-WIDTH 640 :BITMAP-HEIGHT 640) took 37,353 milliseconds (37.353 seconds) to run.
> Of that, 29,550 milliseconds (29.550 seconds) were spent in user mode
> 5,460 milliseconds (5.460 seconds) were spent in system mode
> 2,343 milliseconds (2.343 seconds) were spent executing other OS processes.
> 2,881 milliseconds (2.881 seconds) was spent in GC.
> 466,543,248 bytes of memory allocated.
Roughly:
Bef Aft
User 88 30
System 33 5
GC 24 3
Mem(gb) 2.3 0.5
Wow. Does anyone know why? Was it the &rest -> non-&rest switch? Duane
said the switch would be faster but for a different reason, without
specifying the latter. He also said &rest was efficient if it was (or
was not?) "dynamic extent". Hunh? Whassat? Examples, plz, I really am
just an apps guy.
> For this particular zoom and pixmap size, I can speed things up quite
> a bit by reducing the *fractional-bits* to 12 and cutting back on the
> max-iterations without degrading the image. So the other means of
> getting good results in less time is to algorithmically determine
> what *fractional-bits* and max-iterations should be for a give pixmap
> size and zoom factor.
>
I am still curious what effect changing the defvars to defconstant would
do. I do not see those changing during the run. I understand you want to
make those into parameters eventually. Just curious.
kt
- Previous message: Pascal Costanza: "Re: SETQ vs SETF"
- In reply to: David Steuber: "Code Feedback Wanted (Generating more garbage)"
- Next in thread: Bulent Murtezaoglu: "Re: Code Feedback Wanted (Generating more garbage)"
- Reply: Bulent Murtezaoglu: "Re: Code Feedback Wanted (Generating more garbage)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]