Re: Referencing Nested Sequences
- Posted by kbochert at copper.net Jun 08, 2003
- 518 views
On 7 Jun 2003 at 23:41, Robert Craig wrote: > > > kbochert at copper.net wrote: > > As an example, Bach has a built-in sort. > > For a sequence of 6000 chars, Eu managed 27 / sec. > > while Bach was 125/sec. > > If someone wanted to sort 6000 chars (0-255), > they could use the bucket sort in euphoria\demo\allsorts.ex, > and it would "blow away" your sort. True enough. On my system the integer sort (allsorts.e) of 5120 elements gives: EU : 1.25 ms. Bach: 0.32 ms. Bucket: 0.12 ms The figures I quoted are for a sequence of 6000 2-character sequences, {"a3", "dr", ....} which accounts for the 8ms. (125/sec) quoted vs. the .32 ms above (and disqualifies the bucket) I should also point out that the qsort is slowed a little by a capable compare routine. The sort may be case insensitive or numerical (2 before 12) and may start beyond the first element of a sequence (for 'sorting on fields'). I think these features are very desireable and I would suggest adding them to the Eu sort -- except that no Euphorian has ever asked for them! > When you say "Eu", I assume you mean the Euphoria > interpreter. Don't forget that the Translator can > give a very significant boost to the speed of Euphoria code. > I certainly do mean the interpreter Bach cannot and never will compete with the translator for overall speed! In theory it should match it on a qsort benchmark -- after all, a built in qsort is written in C. Given that Bach cannot translate, bind, trace or profile, it does what it can in other areas. Yours Karl Bochert