3 ms·
Just looking at some .NET programs, they all use unsafe code, which is always faster than using garbage collected memory management, so the results aren't surpr
by xiphias2 6y ago
Just looking at some .NET programs, they all use unsafe code, which is always faster than using garbage collected memory management, so the results aren't surprising.
- cratermoon 6y agoGaming the benchmarks for fun and profit.
- deleted 6y ago[deleted]
- zelly 6y agoIt's using features of the language. Is that not what this is meant to measure/compare? .NET has unsafe, SIMD, and value types which opens it to a whole world of programming that Java is currently unsuited for.
- derefr 6y agoOne would think that a benchmark described in reference to the performance of the virtual machines themselves, would be measuring the performance of pure bytecode (or a JITing thereof), not the performance of native code linked into the runtime.
- jashmatthews 6y agoUsing a native regex extension lib is the norm for "scripting" languages so totally reasonable to benchmark like that. How do you define when it's OK to use a native extension and when it's cheating?
- cel1ne 6y agoYou can call C with Java.
- igouy 6y agoFor example https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/pidigits-java-3.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- fomine3 6y agoBenchmarking both C# [Managed] and C# [Unsafe] is preferred.
- igouy 6y agoLike this ? https://benchmarksgame-team.pages.debian.net/benchmarksgame/measurements/csharpcore.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- john_moscow 6y agoIf you want performance, you need to refactor your code into a small performance-critical unsafe core (that has higher test coverage and audit standards), while keeping the rest of the business logic in the safe domain, and relying on the CLR to do the heavy lifting and guarantee memory consistency. Bonus point: you can write the core in C++ and use COM-like marshaling for absolutely unbeatable performance (no actual COM runtime is needed).
- igouy 6y agoMaybe look at the .NET programs that do not use unsafe code? https://benchmarksgame-team.pages.debian.net/benchmarksgame/measurements/csharpcore.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...