-
Notifications
You must be signed in to change notification settings - Fork 98
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
Zig contribution and Benchmarking on Github actions runner #30
Conversation
Hey, thanks for the PR, Zig has very slow I/O on my machine (5s in total, 80ms on processing). Is that normal? |
It shudn't take 5s. |
These are the results from the github workflow: Zig:
|
This is fine generally total time is 10x compared to w/o IO. My system also gives me similar multiplier value. ~ $ ./run.sh zig
Running Zig
Benchmark 1: ./main
Processing time (w/o IO): 133ms
Processing time (w/o IO): 133ms
Processing time (w/o IO): 131ms
Processing time (w/o IO): 133ms
Processing time (w/o IO): 131ms
Processing time (w/o IO): 135ms
Processing time (w/o IO): 131ms
Processing time (w/o IO): 130ms
Processing time (w/o IO): 132ms
Processing time (w/o IO): 132ms
Processing time (w/o IO): 137ms
Processing time (w/o IO): 140ms
Processing time (w/o IO): 135ms
Time (mean ± σ): 1.065 s ± 0.025 s [User: 0.229 s, System: 0.834 s]
Range (min … max): 1.031 s … 1.119 s 10 runs
Checking output
Output file: related_posts_zig.json is valid! |
Alright, looks like it might be a bug with my processor/os.
|
System time is very high i.e, 5.88secs. This is the time spent by app in sys calls i.e, memory allocation, file reading etc..,. How about other lang implementation system times ? Are they also high as zig i.e, 20x compared to user time ? |
I just merged a fix : #31
|
Are these from ur local system ? |
Yes, the workflow also got a boost: https://github.com/jinyus/related_post_gen#updated-results-from-github-workflow-raw-data |
I'm working on automatic publishing of benchmarking results (from GitHub runner) in Readme. I'll give a separate PR once it's done. |
I wrote a crystal script to extract the results from the workflow log: it prints the new table for the readme and update the raw_results.md file. I should probably rewrite it in python/dart so it can be ran without compiling. I currently do it manually, but it should be of help |
Cool, I can direct my efforts on optimizing zig. |
This Pr provides contribution based on Zig language.
It also has a githubactions workflow file that generates benchmarks on the fly for every PR to main.