|
|
Log in / Subscribe / Register

Benchmark results

Benchmark results

Posted Mar 21, 2024 16:44 UTC (Thu) by sdumitriu (subscriber, #56869)
Parent article: Cranelift code generation comes to Rust

I don't get it... This achieved the incredible feat of speeding up builds from the unbearably high time of 37 seconds, down to a mere... 30 seconds. Based on the hype I was expecting something more like 3 seconds or less.

Unrelated to that, it's ambiguous when saying that Cranelift has "ten sets of related optimizations", compared to "96 optimization passes" for LLVM. What is a set? How big are those sets? Are these 10 sets each made of 10 different optimizations, or are there like 20 (or merely the 5 listed in the article) total optimizations, but grouped in 10 different ways?


to post comments

Benchmark results

Posted Mar 21, 2024 17:35 UTC (Thu) by daroc (editor, #160859) [Link] (1 responses)

Unfortunately, there is no direct comparison between LLVM's optimization passes and Cranelift's ISLE files. By analogy, you might consider comparing the number of source files in a project. The number of source files does not actually tell you anything absolute about the complexity of a project, because a program could throw everything in one large source file or split it out into many small ones. But it is still a useful measure of complexity, because most reasonable programmers tend not to go to either of those extremes. Likewise, LLVM optimization passes and ISLE files are not equivalent, but they are the unit of organization which the developers of each project have chosen.

If you are curious, you can read Cranelift's optimizations here[0], and judge for yourself how similar one of their ISLE files is to one of LLVM's optimization passes.

[0]: https://github.com/bytecodealliance/wasmtime/tree/main/cr...

Benchmark results

Posted Mar 21, 2024 18:32 UTC (Thu) by sdumitriu (subscriber, #56869) [Link]

I see, thanks for the link. It looks like each set consists of several tens of very simple rules of a similar nature, e.g. they all rewrite bit operations into equivalent forms that may or may not be more efficient.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds