[virtmach] Your VM

korek@icm.edu.pl korek@icm.edu.pl
Tue, 29 May 2001 17:53:28 +0200 (CEST)


On Tue, 29 May 2001, Reuben Thomas wrote:

> > Note that gcc tends to take a long time optimizing large switches (hundreds
> > of cases), so the generated switch should be broken into smaller chunks if
> > you do that.
> 
> Surely that defeats the optimization! How long is "too long", anyway? If
> it's that bad, you can stop using -O2, use another compiler for development
> (e.g. LCC) &c. &c.; no need to change the code structure.

Not necessarily. For bytecodes with long execution time and lot of code
the optimization doesn't give much gain, but decreases cache locality.
(I know that your L2 cache may contain it easily, but L1 cache would give
even better performance)

	Greetings :-)
		Michal Gajda
		korek@icm.edu.pl
		*knowledge-hungry student*