Re: Interpreter startup speed
- Posted by Jason Gade <jaygade at yahoo.com> Aug 18, 2006
- 647 views
Al Getz wrote: > Hi Jason, > > Yes that's an interesting idea too, if we had control over what > 'thread' gets compiled first. I would certainly do something like > that. > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > I'm not saying to compile certain threads of the user program first; I'm saying the interpreter should have a compiler thread and a interpreter thread. The compiler thread compiles the first few hundred (or thousand or whatever) instructions to IL code and then starts the interpreter thread. The compiler thread continues compiling in the background (well, both threads would be trading off really). If the interpreter thread ran out of instructions it would sleep for awhile until the compiler thread caught up again. Once the compiler thread finished converting the entire program to IL, it would exit leaving just the interpreter. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.