r/Compilers • u/Top_Marionberry_4413 • 17d ago
Spectre - A design-by-contract programming language with an explicit allocator-centric API that outperforms Zig by up to 6x on General Purpose Benchmarks
https://spectrelang.org/
0
Upvotes
View all comments
Show parent comment
3
u/AustinVelonaut 17d ago
It appears that the 6x claim is based a lot on the results of the
json_parsebenchmark, but the Spectre implementation of a JSON parser parses lazily (only computing spans of digit characters when parsing integers, not the actual integer values), and the benchmark only computes the number of elements in a large array, so no processing of the raw character data at all. If the benchmark were changed to actually do work like computing the sum of the parsed array, then I assume the huge performance gains would disappear.Also, calling a benchmark tuned to only return the number of elements a "general purpose benchmark" is a bit disingenuous.