[VM] HashBits, a lazy way

Andreas Raab andreas.raab at gmx.de
Sun Jul 20 01:27:26 UTC 2003


> However  when I looked at allocation rates for 1 asFloat,  
> 2 at 3, Array  
> new: 5 I saw
> 
> june30thVM 37,654, 40,198, 31,037
> 
> 3.6.1bxVM    75,952,  82,524, 39,325
> 
> Ah, much nicer, also quite remarkable as compared to the powerpc  
> benchmarks.

I reran a couple of allocation benchmarks based on the hash-table allocation
and I got a 10-20% speedup in allocating floats and points but unfortunately
they didn't translate into anything measurable for the macros (there's a .2%
advantage but I don't trust it given that the improvements are not
consistent across the board). So it seems as if using the table lookup
definitely has some advantages (even though their mileage apparently
varies). Here are my benchmarks + results:

Float allocation benchmark:

Time millisecondsToRun:[
	1 to: 1000000 do:[:i|
		1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.
		1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.
	].
].

Point allocation benchmark:

Time millisecondsToRun:[
	1 to: 1000000 do:[:i|
		1 at 1. 1 at 1. 1 at 1. 1 at 1. 1 at 1.
		1 at 1. 1 at 1. 1 at 1. 1 at 1. 1 at 1.
	].
].

3.5.1:
Float allocation:	2567 msecs			(100%)
Point allocation:	2253 msecs			(100%)
Bytecode speed:	117,323,556 bps		(100%)
Send speed:		  3,419,636 sps		(100%)
Macrobenchmarks:	#(8798 57570 20546 9797 0 6425 3828) 
			=> 106964 msecs		(100%)

3.5.1 + CodeGenEnh-ar:
Float allocation:	2409 msecs			(+6%)
Point allocation: 2245 msecs			(+0%)
Bytecode speed:	128,514,056 bps 		(+9%)
Send speed:		  3,755,704 sps		(+10%)
Macrobenchmarks:  #(8272 53889 18588 9395 0 6105 3683)
			=>  99932 msecs		(+7%)

3.5.1 + CodeGenEnh-ar + BitOfGCTuning-JMM + AllocateNoFillHashTable-JMM:
Float allocation:  2160 msecs			(+18%/+12%)
Point allocation:  1900 msecs 		(+18%/+18%)
Bytecode speed:    128,643,216 bps		( +9%/ +0%)
Send speed:          3,755,704 sps		(+10%/ +0%)
Macrobenchmarks:   #(8181 53922 18771 9109 0 6042 3692)
			=>  99717 msecs		( +7%/ +0%)

Give or take a few percent as I have been running other apps while doing the
benchmarks.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list