4 ms·
If it compiles and run it is allowed. There is no rule to benchmark other than having the same end result with best performance. I still can't get all the mora
by fungos 10y ago
If it compiles and run it is allowed. There is no rule to benchmark other than having the same end result with best performance.
I still can't get all the moral over this.
The best thing here for Rust would be to achieve the best performance on this game and nothing else.
To me this game is important and winning on it is more yet. So, if Rust don't have better result by "morals" this is so wrong that hurts. But each time I read these responses I ask myself if there is not a real problem there.
I like Rust, but performance is decisive. It is really sad to see that Rust keeps going down on this game and that makes me question myself when trying to invest time on Rust.
- sanderjd 10y agoIt isn't a "moral" issue. It is about the usefulness of the benchmarks. If you're using them to make a recommendation about which programming language to choose, it is important to have a sense for how well the results generalize to the kind of programs you will be writing. Using unrealistic hacks targeted specifically to each benchmark is contra that goal. If, on the other hand, you're just treating the benchmarks as a fun competition akin to code golf, then by all means, hacks ahoy!
- steveklabnik 10y agoThe Benchmarks Game has more rules than that. It's not about "morals."
- fungos 10y agoBut people are criticizing C because the way it is implemented is not "realistic". Or that the "hash" is a hack that will never work in real life. I don't know the background of these people, but they couldn't be more wrong. So that looks like "morals" or just they don't ever saw real C code out there.
- steveklabnik 10y agoYou're making an assumption that the C code is allowed to have the same algorithm as the Rust code. This is not actually exactly true, based on the rules of the game.
- igouy 10y agoWhere is it forbidden for programs written in C to use FNV? For example https://github.com/haipome/fnv/blob/master/fnv.c https://github.com/haipome/fnv/blob/master/fnv.c
- steveklabnik 10y agoI'm referring to my reply to you above about not being able to implement a different map, not the hash function itself.
- deleted 10y ago[deleted]
- eridius 10y ago> The best thing here for Rust would be to achieve the best performance on this game and nothing else. That's absurd. The benchmarks game doesn't measure real-world performance in any sense whatsoever. And many of the implementations are written in ways that you'd never ever put into production code (for example, the laughably bad hashing functions that are mentioned elsewhere in this thread). From what I understand, the Rust implementations tend to not get up to those shenanigans, which makes them appear worse than the implementations from other languages that do. It's not the goal of a programming language to be the top on a silly benchmarks game. The goal is to be an excellent language for real-world use.