v5 performance

compare to som42b

Here is the raw data.
-------------------------------------------------

small program : bubble, matmul, queen, queen2, quick
medium program: aes4, lexer, parser, pgen													

		som42b						v5					
		noi	runtime (ms)		average	code 	noi	runtime (ms)		average	code size (int)
bubble x1000	5792	140	141	125	135.33	143	3385	109	109	125	114.33	134
matmul x1000	9958	187	203	203	197.67	271	6009	188	188	188	188.00	224
queen x100	386965	532	531	515	526.00	237	265204	516	516	515	515.67	200
queen2 x100	227309	328	328	344	333.33	273	131394	297	282	281	286.67	239
quick x1000	26471	375	344	343	354.00	203	18338	281	343	344	322.67	185
													
aes4 x1000	17627	281	282	281	281.33	875	10101	234	234	234	234.00	752
lexer x10	381430	188	187	171	182.00	2001	212746	171	156	156	161.00	1650
parser x1	1088511	32	31	31	31.33	5313	593632	31	31	31	31.00	4819
pgen x100	87011	360	328	359	349.00	2983	47148	297	312	313	307.33	2601

som-v2 x1       2570171 187     172     187     182     9379    1475754 156     156     141     151     8129

		noi ratio	runtime ratio	code size ratio	som42 Mips	v5 Mips

bubble x1000	0.5844		0.8448		0.9371		42.80		29.61
matmul x1000	0.6034		0.9511		0.8266		50.38		31.96
queen x100	0.6853		0.9804		0.8439		73.57		51.43
queen2 x100	0.5780		0.8600		0.8755		68.19		45.84
quick x1000	0.6928		0.9115		0.9113		74.78	61.94	56.83  43.13
										
aes4 x1000	0.5730		0.8318		0.8594		62.66		43.17
lexer x10	0.5578		0.8846		0.8246		20.96		13.21
parser x1	0.5454		0.9894		0.9070		34.74		19.15
pgen x100	0.5419		0.8806		0.8719		24.93		15.34
										
	average	0.5958		0.9038		0.8730		50.33		34.06

som-v2 x1       0.5741          0.8296          0.8667          14.12            9.77

------------------------------------------------
note parser  gives errors when repeat, so run at x1 only, it inputs itself			
note pgen inputs from "parse-grammar.txt" of som42a						
note lexer inputs itself							
note code size is inspected from obj file, the size of CS in int				

Results

noi v5 is 60% of som42b    
runtime is 90%   
code size is 87%				
Mips small program (compare with Birthday benchmark)  som42b 62, v5 43			
Mips all program   som42b 50, v5 34						
	
Discussion

The noi figure is as good as expected.  noi is reduced 40% compared to one-address som42. However, it does not translated into runtime speedup.  Only 10% speedup of v5 compared to som42b. The surprise result is the size of code, although v5 instruction format is 96-bit, it is more compact than som42 which is 64-bit.  It means the code has higher density. This should be investigate further.  

The small program benchmark can be used to compare with Birthday benchmark.  som v19v design is guided by queen2 program.  v5 vm is follows from v19v, in this respect it does quite well.  For queen2 runtime, this is the fastest runtime achieved to date.

5 December 2009
Long Live the King


