space/speed tradeoff in configuring TT

Thomas Reilly treilly at
Mon Jun 30 17:41:25 PDT 2008

I know the mozilla guys got some mileage out of profile directed optimization for Moz 3.  They might have some ideas. GC.cpp and GCAlloc.cpp probably could benefit from it too.

-----Original Message-----
From: tamarin-devel-bounces at on behalf of Steven Johnson
Sent: Mon 6/30/2008 5:35 PM
To: Edwin Smith; Haghighat, Mohammad R; tamarin-devel at
Subject: Re: space/speed tradeoff in configuring TT
I'm guessing that picking just a half-dozen files and optimizing for speed would make a big diff: VMInterp.cpp, SymTable.cpp, a few others....

On 6/30/08 5:32 PM, "Edwin Smith" <edwsmith at> wrote:

	We're making use of the x-platform build scripts, which enable flexibly generating makefiles for different configurations.  There is no "prefer size or speed" configuration option; lacking such a thing, the default should be a good blend.  Given the current climate of the project i'd go out on a limb and say 13% size increase is worth a 13% speedup, especially knowing that we can get back a lot of that size increase by doing the work of picking which subset of source files to optimize for speed.
	The windows x-platform build scripts for TT were broken for a while, but I just saw a patch that should fix them.
	From: tamarin-devel-bounces at [mailto:tamarin-devel-bounces at] On Behalf Of Haghighat, Mohammad R
	Sent: Monday, June 30, 2008 8:25 PM
	To: 'tamarin-devel at'
	Subject: space/speed tradeoff in configuring TT
	In TT configuration on Windows, by replacing the current optimization settings tuple (/Ox, /Os) which favors smaller code size over speed to (/O2, /Ot) which favors speed, one can achieve good speedups. The binary size is increased by ~13% (407552 -> 460288 : 12.9%) while the average speedup on Sunspider is 13.8%. I've not measured the impact on other platforms, but the results might be helpful in deciding where to put the cutoff line in the space/speed tradeoff. Do we have a guiding principle?
	- moh
	C:\tamarin-tracing\test\performance> -i 50 sunspider/
	Executing tests at 2008-06-30 16:24:10.343000
	avm: C:\tamarin-tracing\platform\win32\obj_9\shell\Release\avm_orig.exe
	avm2: C:\tamarin-tracing\platform\win32\obj_9\shell\Release\avm2_O2Ot.exe
	test                                                  avm   avm2     %sp
	sunspider/                    219.0   187.0    14.6
	sunspider/                        422.0   360.0    14.7
	sunspider/                           484.0   375.0    22.5
	sunspider/                          172.0   156.0     9.3
	sunspider/                32.0    31.0     3.1
	sunspider/                    109.0    94.0    13.8
	sunspider/                     578.0   500.0    13.5
	sunspider/                     172.0   140.0    18.6
	sunspider/                   94.0    78.0    17.0
	sunspider/                             469.0  406.0    13.4
	sunspider/                             422.0   360.0    14.7
	sunspider/                            110.0    94.0    14.5
	sunspider/                            125.0   110.0    12.0
	sunspider/                      640.0   531.0    17.0
	sunspider/                     109.0    94.0    13.8
	sunspider/                               469.0   406.0    13.4
	sunspider/                              265.0   250.0     5.7
	sunspider/                           609.0   515.0    15.4
	sunspider/                           359.0   312.0    13.1
	sunspider/                  812.0   687.0    15.4

	Tamarin-devel mailing list
	Tamarin-devel at

More information about the Tamarin-devel mailing list