ELENA-LANG / elena-lang

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces
https://elena-lang.github.io/
MIT License
233 stars 24 forks source link

ELENA benchmark sample #299

Open arakov opened 7 years ago

arakov commented 7 years ago

A benchmark example should be created to compare performance to c, c#, java, smalltalk, ruby

bencz commented 3 years ago

I went to do some comparative analysis of the BrainF * ck interpreter and when trying to run 2 banchmark scripts I got exceptions ... I tried to run changing the variable "const int Solution" but it didn't work

bench.txt mandel.txt

arakov commented 3 years ago

Which version did you use? I recommend the nighty build - https://ci.appveyor.com/project/arakov/elena-lang/build/artifacts

bencz commented 3 years ago

I had tested it with the master ... I downloaded this release and it also didn't work

arakov commented 3 years ago

One of the problem is a comment at the program start. I updated asmrules.es (in current) and it works for bench. There is a second problem with mandel.txt. I will look at it later.

bencz commented 3 years ago

I tried to check some possibilities, like the stack size, but the error persisted ... And I noticed that the process using Tape, as it is currently done, is VERY SLOW !! compared with online interpreters and many others ... the execution time is gigantically different (using bench.txt as a test)

Take a look: https://copy.sh/brainfuck/?c=IEJlbmNobWFyayBicmFpbmYqY2sgcHJvZ3JhbQo-KytbPCsrKysrKysrKysrKys-LV08W1s-Kz4rPDwtXT5bPCs-LV0rKysrKysrKwpbPisrKysrKysrPC1dPi5bLV08PD4rKysrKysrKysrWz4rKysrKysrKysrWz4rKworKysrKysrK1s-KysrKysrKysrK1s-KysrKysrKysrK1s-KysrKysrKysrK1s-KworKysrKysrKytbLV08LV08LV08LV08LV08LV08LV08LV0rKysrKysrKysrLgogIA$$

arakov commented 3 years ago

of course it is slow. But you may use the script to generate C code and compile it :)

arakov commented 3 years ago

If someone will provide faster solution I wouldn't mind :)