[Larceny-users] make-bytevector and bytevector-copy

William D Clinger will at ccs.neu.edu
Sun Feb 15 20:19:30 EST 2009


Ed wrote:
> So my question is, is the first version of 'get-modelview-matrix'
> shown above inherently "hot"?

Maybe.  The other possibilities are that
(glGetDoublev GL_MODELVIEW_MATRIX bv) takes a long
time or that the profiler is overcounting calls to
foreign	procedures for some reason.

In any case, calling bytevector-copy instead of
make-bytevector	won't buy you much (if anything),
and it may make your code harder to understand or
to debug.  There's no reason why bytevector-copy
should run faster than make-bytevector;	in fact,
I'd expect make-bytevector to run faster than
bytevector-copy.

Will



More information about the Larceny-users mailing list