mir: Awk has a syntax error in the benchmarks

Specifically, the line shows: awk: cmd. line:1: BEGIN {if (2,88==0) print "Inf"; else printf "%.2f\n", 2,88/2,88;} awk: cmd. line:1: ^ syntax error.

About this issue

  • Original URL
  • State: open
  • Created 7 months ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

I don’t think languages other than C or shell script fit in this project though. JS/bun is probably not a good fit.

My reasoning was, Janet script can be compiled to C. If you know C, C is better.

Update: Using the bbv branch, c2m -eg has 0.88x (average) and 0.81x (geomean) the runtime of clang -O3 (didn’t use “inline” in these tests as I practically won’t use them in production) while producing 40-50 times smaller file sizes and compiling 3-4 times faster!

Add shebangs, system calls and libraries, and I don’t see a reason for LLVM to exist for most use cases, lol! And I won’t even talk about QBE…

I would like help making the benchmark tool more advanced, but as I don’t know shell scripting, I have another idea. I will create another benchmark suite written in Typescript, and it will require bun to run. This can be offered as an alternative for someone that wants something more advanced. It will also show the compile times and file sizes and will let you choose which “capabilities” you want to use. So, yours will be there (and you can modify as needed) but there will be another one. What do you say? I will do it anyway for personal use, but would you want me to make a merge request once it is done? Do you have any other idea?

Thank you for the discussion. I addrd clearing LC_NUMERIC to the script.

Btw, I did run the benchmarks compared to clang: -O2, -O3 and -O3 -finline -finline-functions and the geomean of c2m -eg was 0.75x of clang -O2 so good job!

If you use master branch, you should check bbv branch. It generates a better code (by 5-10%).

https://developers.redhat.com/blog/2021/04/27/the-mir-c-interpreter-and-just-in-time-jit-compiler#how_the_mir_c_compiler_compares_with_other_c_compilers might be interesting for you as it compares a lot of different C compilers although the data are not fresh.