-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Awk has a syntax error in the benchmarks #382
Comments
It works for me on Linux. It seems Could you give more info how to reproduce it. |
Well... I truly haven't changed anything! I could give you info about my system! Linux: |
Have you tried removing all |
@vnmakarov said the same, but I'm apparently blind 🤦 Yes, "LC_NUMERIC" is set. Unsetting it solves the problems. Now, before I close that. Should the script unset it manually? |
To add on my previous reply (I don't edit in case someone is reading it right now), I run a script and when you unset it inside a script, it will not affect the shell when the script is over. So I would suggest you make the script unset it. Btw, I did run the benchmarks compared to clang: I would also suggest that you show the compile times for each test and then the total compile time of all as this is also a metric! |
It should, although that's a work around. What was your |
It was set to: |
I cannot reproduce this. What I ran in fish:
what command did you use to run the benchmark? |
Thank you for the discussion. I addrd clearing LC_NUMERIC to the script.
If you use master branch, you should check 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. |
I am using ZSH (kernel and awk info above) and I run: |
Thanks. Even if @iacore didn't have the same problem (when trying to set LC_NUMERIC) and some others may not, you will save some time from the issues of people who will have that problem like me.
Thanks for the info. We have talked about it, and I was using that branch for my test until now, but I thought about sticking to
Thank you for the info, but 2 and a half years ago is a loooooot of time! In that period, clang (llvm) went from both compiling slower and producing worse code than GCC to basically doing an 180 degree and beating GCC on my system! So yeah, I prefer to have the benchmark suit as a good indication of how things are going as compilers change rapidly. The only thing I would suggest, is to add compile times for every test separately and a sum in the end. In any case, your work opens new possibility and ways to think about compilation! I have tried to compile this program (no recursion version and slightly modified) and the output file is 16.000 bytes for clang and just 360 bytes for Mir!!! While the execution takes more for Mir. And I suppose you can still do a lot of optimization for both files sizes, compilation speed and code quality compared to LLVM who is already optimized as much as possible (or at least "practically" possible). JIT is the future!!!! I will try with the |
Update: Using the 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? |
If you want, try Janet. you can include the language itself as |
You mean Janet? If yes, then the point is to not have to spend time learning something else that won't use anywhere else and instead, spent that time to work on an easy language that I know and have the benchmarks faster. I also cannot spend a lot of time as I have to learn Svelte and continue my work in Nemesis. So, I'm going to have to make this quick! |
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. |
Yeah, I would agree if we were talking about the source code, but this is about benchmarking, so I don't think that it's a big problem as long as it as SECOND choice and the shell script remains. That's why I didn't say to remove the current benchmarks.
I understand but like I said I don't have so much time. I know C but C will make my life so much harder... |
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
.The text was updated successfully, but these errors were encountered: