Hacker News new | ask | show | jobs
by buffportion 5023 days ago
Why use strings at all? Guid.NewGuid() is built in, and way faster. Given that the C# code is almost willfully unoptimized, I'm not sure what the benchmark was meant to prove.
1 comments

To be fair, it was trying to compare JIT vs. non-JIT. As futile as that me be via a microbenchmark like this, you need to compare as similar an execution path as possible. As it happens, the C# version is doing 16000000 more lookups for the Encoding than the RealBASIC version. Remove that, and C# - and by the premise of the post, JITters - wins.