[self-interest] Re: Self ported to Linux

Samantha Atkins samantha at objectent.com
Wed Jan 30 01:30:06 UTC 2002

Jecel Assumpcao Jr wrote:

> The famous Self compiler that ran numerical benchmarks at 50% the speed 
> of optimized C was introduced in Self 2.0 and was created by Craig 
> Chambers. The result is simply amazing when you consider that C does no 
> index or overflow checking and had a far better code generator. Craig's 
> compiler was a huge leap forward in type analysis and he has continued 
> this work in his Vortex Compiler project (for the Modula 3 and Cecil 
> languages). The problem was that compilation was slow and so 
> interactive use of Self 2 wasn't very nice. The compiler didn't do such 
> a great job in highly polymorphic (very OO styled) benchmarks.

The really nice option would be to have the uber-compiler 
available for streamlining production code but not turned on 
during normal development cycles.

> In Self 3 and 4 an entirely different direction was taken by Urs 
> Hölzle. Two simple compilers replaced the complex one used previously, 
> and type analysis was replaced with type feedback. The first compiler 
> (NIC, the Non Inlining Compiler) did a quick and dirty job that allowed 
> code to start running. Data structures called PICs (Polymorphic Inline 
> Caches) improved the performance of message sending and, as a side 
> effect, collected information about the types of objects actually used 
> in the various call sites in the code. When a given method was 
> identified as being critical to system performance (a "hot spot", hence 
> the name of the technology given at Animorphics and included in Java 2) 
> the second compiler (SIC, the Simple Inlining Compiler) was called to 
> generate much better code. Though the type information available in the 
> PICs was just a subset of what could be obtained with type analysis, it 
> was good enough for the SIC to do a good job very quickly.

Very cool.  It brings up some interesting and provocative ideas.

- samantha

More information about the Self-interest mailing list