Re: Eu Interpreted
- Posted by Graeme <graemeburke at hotmail.com> Aug 13, 2001
- 432 views
At 09:57 13/08/01 -0400, you wrote: > >On Monday 13 August 2001 15:46, Kat wrote: > >> Speaking of Lua, has anyone compared the Eu interpreters coded in Eu to >> the Lua ability to exec commands stored in strings? Are they as fast? Less >> able? What about nested procedures and functions, and lengths of the >> strings? If Eu has a line length limit, is a string that exceeds this limit >> non- executeable in the interpreters? So i cannot pass a 1/2 megabyte file >> to the doubley interpreted Eu, right? I accept that the interpreted >> languages are slower than compiled languages, but is the doubly-interpreted >> Eu still as fast as the Lua in a dostring()? > >Kat: > >Reading a 10,500 line text file and sorting it100 times in Euphoria takes >9.38 seconds, the same task in Lua takes 9.61 seconds. Making the sort call >via "dostring" instead of direct takes 9.62 seconds. I don't think Euphoria >interpreting Eu code is going to be able to beat that. Or even come close. > >Regards, >Irv If you did some preprocessing to produce an include file containing an indexed table of routine_id's from all routines used you could do it without much overhead, apart from the cost of the table itself. You would need a routine to recognize and call builtins, but that would just be a simple switch. in the example above the dostring("file=sort(file)") or whatever could be only 2 lookups and a call_func. So speeds might be comparable. routines declared within strings would be another matter, but I imagine most calls would be to pre-defined stuff..... Graeme