rustc-perf
zig
Our great sponsors
rustc-perf | zig | |
---|---|---|
26 | 812 | |
590 | 30,295 | |
2.4% | 4.1% | |
9.7 | 10.0 | |
7 days ago | 2 days ago | |
Rust | Zig | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rustc-perf
-
Adding runtime benchmarks to the Rust compiler benchmark suite
> what do people use to run benchmarks on CI?
Typically, you purchase/rent a server that does nothing but sequentially run queued benchmarks (and the size/performance of this server doesn't really matter, as long as the performance is consistent), then sends the report somewhere for hosting and processing. Of course, this could be triggered by something running in CI, and the CI job could wait for the results, if benchmarking is an important part of your workflow.
But CI and benchmarks really shouldn't be run on the same host.
> What does the rust project use?
It's not clear exactly where the Rust benchmark "perf-runner" is hosted, but here are the specifications of the machine at least: https://github.com/rust-lang/rustc-perf/blob/414230abc695bd7...
> What do other projects use?
Essentially what I described above, a dedicated machine that runs benchmarks. The Rust project seems to do it via GitHub comments (as I understand https://github.com/rust-lang/rustc-perf/tree/master/collecto...), others have API servers that respond to HTTP requests done from CI/chat, others have remote GUIs that triggers the runs. I don't think there is a single solution that everyone/most are using.
- [rustc-perf] Runtime benchmarks got finally merged
-
Ask HN: Was programming more interesting when memory usage was a concern?
A lot of effort is spent to reduce the size of structs in the Rust compiler
https://nnethercote.github.io/2023/03/24/how-to-speed-up-the...
3% and 6% of improvement doesn't seem like much, but at the level of rustc those big wins
Performance of Rustc must be continously tracked (here https://perf.rust-lang.org/) because if you don't proactively fight against bloat, the tendency is that the code will become slower over time (due to new features etc)
-
Can Rust's compile time match its runtime performance?
hmm really really hard to answer :'), it's tradeoffs I think, no matter what you think Rust (cmiiw, I'm not qualified to say this) has (and probably in the future will adds more with guards on compiler metrics https://perf.rust-lang.org/) several phases that given the diffs to other language, might not available to any language compiler out there, if it's available I think rustc already did their best in here (some already being parallized etc etc, might be wrong since I can't refs any reference MRs, but it does exists though labels regarding this)
-
How to catch performance regressions in Rust
About a year ago I was looking for a tool like Rust perf for my application code. I did some research and found a lot of prior art. However, nothing checked all the boxes I was looking for, so I built Bencher!
- Rust – Are We Game Yet?
-
Next Rust Compiler
https://www.pingcap.com/blog/rust-compilation-model-calamity... is a good overview. In general it varies depending on the crate but we track the performance at https://perf.rust-lang.org/ - if you look at cargo, for example, over 60% of the time is spent in codegen through LLVM: https://perf.rust-lang.org/detailed-query.html?commit=222d1f...
- Data-driven performance optimization with Rust and Miri
-
Generic associated types to be stable in Rust 1.65
Something like https://perf.rust-lang.org/?
-
This Week in Rust #463
The performance full-report link is dead: https://github.com/rust-lang/rustc-perf/blob/master/triage/2022-10-04.md
zig
-
How to Write a PHP Extension with Zig?
When writing code in a scripting language, sometimes you need that extra bit of performance (or maybe an async feature from Zig).
-
Bun - The One Tool for All Your JavaScript/Typescript Project's Needs?
NodeJS is by no means a slow runtime, it wouldn’t be so popular if it was. But compared to Bun, it’s slow. Bun was built from the ground up with speed in mind, using both JavascriptCore and Zig. The Bun team spent an enormous amount of time and energy trying to make Bun fast, including lots of profiling, benchmarking, and optimizations.
-
Bun 1.1
ntdll.dll!RtlUserThreadStart()
There are valid reasons to use APIs from NTDLL. Where I disagree with zig#1840 is the idea that it is always better to use NTDLL versions of API. Every other software ecosystem uses the standard Win32 APIs and diverging from that without a good reason seems like a good way to have unexpected behavior. One concrete example is most users and programmers expect Windows to redirect some file system paths when running on WOW64. But this is implemented in Kernel32, not ntdll.
- Zig, Rust, and Other Languages
-
Nanos – A Unikernel
Zig also has an IRC channel on libera (#zig) that is moderated by Andrew Kelley.[1]
- Ask HN: What Underrated Open Source Project Deserves More Recognition?
-
Top Paying Programming Technologies 2024
1. ZIG - $103,611
-
MicroZig: Unified abstraction layer and HAL for Zig on several microcontrollers
ESP32 and STM32 support is very welcome!
I have been following https://github.com/ziglang/zig/issues/5467 for a while and progress seemed to have slowed significantly
-
Asynchronous Clean-Up (in Rust)
I have never used it directly, take what I say with a grain of salt.
As far as I know at least part of the idea was to eliminate the function coloring problem by letting the compiler do some nifty compile-time deductions. This had some issues (I don't know if this is still planned, it seems like the kind of thing that should not work in practice). Additionally, there were all sorts of hard technical issues with LLVM, debugging, etc.
I recommend checking the issue tracker, eg. https://github.com/ziglang/zig/issues/6025
I personally don't understand the domain well enough at all, but honestly, I feel like (if possible) Zig should try to double down on its allocator approach.
Instead of trying to use some compile-time deduction magic explicitly pass around an "async runtime/executor" struct which you explicitly have to interact with. Why not?
-
Show HN: Tokamak – A Dependency Injection-Centric Server-Side Framework for Zig
Yes, fundamentally. In Rust if you take a parameter of generic type T without any bounds, you cannot call anything on it except for things which are defined for all types. If you specify bounds, only things required by the bounds can be called (+ the ones for all types). Another difference is where you get an error when you try pass something which doesn't adhere to a certain trait. In Rust you will get an error at the call site, not at the place of use (except if you don't specify any bounds).
Zig is doing just fine without any trait mechanism and it simplifies the language a lot but it does come up from time to time. The usual solution is to just get type information via @typeInfo and error out if the type is something you're not expecting [0]. Not everybody is happy about it though [1] because, among other things, it makes it more difficult to discover what the required type actually is.
[0] https://github.com/ziglang/zig/blob/b3aed4e2c8b4d48b8b12f606...
What are some alternatives?
glTF-Sample-Models - glTF Sample Models
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
rusty-dos - A Rust skeleton for an MS-DOS program for IBM compatibles and the PC-98, including some PC-98-specific functionality
Odin - Odin Programming Language
unreal-rust - Rust integration for Unreal Engine 5
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
RustPython - A Python Interpreter written in Rust
rust - Empowering everyone to build reliable and efficient software.
nanoserde - Serialisation library with zero dependencies
go - The Go programming language
Cargo - The Rust package manager
ssr-proxy-js - A Server-Side Rendering Proxy focused on customization and flexibility!