[ENH][VM] Improved code generation (hopefully ;)
Yoshiki.Ohshima at acm.org
Yoshiki.Ohshima at acm.org
Wed Jul 9 02:13:10 UTC 2003
Hello,
> So given that we've already got the allocator setup to do no fill,
> because that's how contexts are allocated, I made a
> instantiateSmallClass: classPointer sizeInBytes: sizeInBytes
>
> and for
> | v |
> v _ Time millisecondsToRun: [10000000 timesRepeat: [1 asFloat]].
> ^v
>
> Before 13081,14205,12756
> After 12679,12899,12470
>
> Gain is slight, more smarter tools showed that the fill in
> instantiateSmallClasssizeInBytesfill:
> took about 15% of the cycles, so it is significant for the execution of
> the routine.
In the above benchmark, you can unroll the loop to measure the real
difference:
^ Time millisecondsToRun: [1000000 timesRepeat: [
1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.
1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.
]].
I bet the difference is actually more than 15%.
# And, I advocated to have the no-fill version of non-pointer object
# creation primitive almost 3 years ago^^;
-- Yoshiki
More information about the Squeak-dev
mailing list
|