Hi guys, I recently wrote a small line graph plotting app using Lispbuilder, SBCL and OS X. Basically the app draws a little line graph every frame that measures some input. I was pretty astounded to find that doing ~200 sdl-gfx-draw-line-* calls was taking about 2.5ms. So for fun I did a little profiling, etc. I recompiled Lispbuilder with (optimize (speed 3) (safety 0) (debug 0)), and used per-function profiling. The biggest surprise for me was seeing that fairly trivial functions were consing a lot of data. From memory the functions that surprised me were: PACK-COLOR FP R G B A
All functions that should really be non-consing & very quick, and probably inline too. I think that R, G, B, A functions are slow due to the way that Lispbuilder stores color as a vector, rather than a (simple-array (unsigned-byte 8)), though it maybe should even be an (unsigned-byte 32). I couldn't work out why FP was consing/slow, I assume that is an SBCL problem with auto generated CLOS reader functions. Anyhow, I don't know if anybody cares :) Cheers, Brad _______________________________________________ application-builder mailing list [email protected] http://www.lispniks.com/mailman/listinfo/application-builder
