[Larceny-users] profiling spirales

Eduardo Cavazos wayo.cavazos at gmail.com
Mon Feb 16 13:13:03 EST 2009


William D Clinger wrote:

> If x is an inexact integer in the fixnum range, however, then
> Larceny could recognize that special case and avoid the bignum
> arithmetic.  Larceny wasn't recognizing that special case.  As
> of changeset:6062, it does.  That special case is now over
> twice as fast as the general case.

I updated from svn and rebuilt larceny. I also spent some time yesterday 
  implementing your suggestions regarding eliminating mixed 
fixnum/flonum arithmetic.

There are three profile reports shown below for spirales. They are 
drastically different from the original ones. No mention of bignum! :-)

Thanks for the fix!

Ed

----------------------------------------------------------------------
Words allocated: 41940382
Words reclaimed: 0
Elapsed time...: 11333 ms (User: 9521 ms; System: 1552 ms)
Elapsed GC time: 19 ms (CPU: 8 in 40 collections.)

  %  topmost named procedure
34  \x0;line~19CqCO~1267
18  \x1;get-modelview-matrix
16  map
9  \x1;->
7  ffi/apply
4  div-and-mod
4  flonum-check
3  dynamic-wind
3  \x1;vector-of-floats->bytevector
1  syscall
1  \x1;gl-flip

  %  active procedures
100  r5rs-entry-point
100  repl
100  \x1;run-with-profiling*
100  run-with-stats
100  \x0;line~19CqCO~1267
22  \x1;get-modelview-matrix
16  map
9  \x1;->
7  ffi/apply
5  \x1;gl-flip
4  div-and-mod
4  flonum-check
3  dynamic-wind
3  \x1;vector-of-floats->bytevector
1  syscall
----------------------------------------------------------------------
Words reclaimed: 0
Elapsed time...: 11238 ms (User: 9313 ms; System: 1732 ms)
Elapsed GC time: 19 ms (CPU: 16 in 40 collections.)

  %  topmost named procedure
44  \x0;line~19CqDy~1267
14  map
10  ffi/apply
8  \x1;get-modelview-matrix
7  \x1;->
6  \x1;gl-flip
4  dynamic-wind
3  \x1;vector-of-floats->bytevector
1  expt
1  flonum-check
1  div-and-mod

  %  active procedures
100  r5rs-entry-point
100  repl
100  \x1;run-with-profiling*
100  run-with-stats
100  \x0;line~19CqDy~1267
14  map
14  \x1;get-modelview-matrix
10  ffi/apply
8  \x1;gl-flip
7  \x1;->
4  dynamic-wind
3  \x1;vector-of-floats->bytevector
1  %flonum->integer
1  expt
1  flonum-check
1  div-and-mod
----------------------------------------------------------------------
Words allocated: 41940356
Words reclaimed: 0
Elapsed time...: 11592 ms (User: 9613 ms; System: 1796 ms)
Elapsed GC time: 21 ms (CPU: 16 in 40 collections.)
  %  topmost named procedure
43  \x0;line~19CqE4~1267
12  map
10  \x1;get-modelview-matrix
10  \x1;->
8  ffi/apply
6  \x1;gl-flip
4  dynamic-wind
3  \x1;vector-of-floats->bytevector
1  expt
1  flonum-check
1  div-and-mod

  %  active procedures
100  r5rs-entry-point
100  repl
100  \x1;run-with-profiling*
100  run-with-stats
100  \x0;line~19CqE4~1267
15  \x1;get-modelview-matrix
12  map
10  \x1;->
8  ffi/apply
8  \x1;gl-flip
4  dynamic-wind
3  \x1;vector-of-floats->bytevector
1  %flonum->integer
1  expt
1  flonum-check
1  div-and-mod
----------------------------------------------------------------------



More information about the Larceny-users mailing list