[M3devel] multi-threaded m3front?

Olaf Wagner wagner at elegosoft.com
Tue Aug 11 09:13:25 CEST 2015


On Mon, 10 Aug 2015 22:00:17 -0700
Darko Volaric <lists at darko.org> wrote:

> A more fruitful approach might be pipelining the compiler:
> 
> - files enter the pipeline in reverse dependency order
> - have a thread (stage) to read those files into memory
> - have a thread to tokenize and parse the files and form the data structure
> - have a thread to do intermediary processing
> - have a thread to generate the output representation for the back end
> 
> You'll only get a maximum 4x speedup and you'll only be as fast as the
> slowest thread, but you can reliably tune the divisions based on simple
> benchmarking of each thread. You're very likely to get somewhat close to
> the 4x speedup. This works best when there is a 1:1 between pipeline stages
> and cores. If you were ambitious you could attempt an 8 stage pipeline for
> 8 core processors.
> 
> 
> On Sat, Aug 8, 2015 at 8:05 PM, Jay K <jay.krell at cornell.edu> wrote:
> 
> > Is anyone interested in updating m3front to be multi-threaded?
> >
> > I haven't seen a single core system in a while.
> >
> > Surely each module can be compiled separately, possibly with some
> > serialization around compiling interfaces?

While this is all correct, I'd like to remark that in my expecience
optimizing for performance has always got in the way of clear,
understandable and maintainable code.

So while there are semantic refactorings and feature additions in the
pipeline I would not like to see anybody rework the whole compiler
with the intention of making it faster. I would rather see the few
active programmers interested in M3 concentrate on more backends, better
intermediate code, better code optimization, better maintainability
etc.

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com 
               Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194



More information about the M3devel mailing list