Programming-Language-Benchmarks icon indicating copy to clipboard operation
Programming-Language-Benchmarks copied to clipboard

Unfair removing C# code

Open Neo-vortex opened this issue 3 years ago • 4 comments

why is this removed? https://github.com/hanabi1224/Programming-Language-Benchmarks/commit/36160bcb0aa5916ae0078e7256c1278784b6af90#diff-dad64536dad5a5311a7f653d00f5f8e10fb1fa76e473e7abca4c8a1df12680e2

On the next commit it says, "removed the trick of using struct" !

can anyone elaborate on this matter? using language specific features is bad?

Neo-vortex avatar Nov 12 '22 12:11 Neo-vortex

Because they unfairly halve number of allocations

hanabi1224 avatar Nov 14 '22 18:11 hanabi1224

can you define what does "unfair" mean? for example, if I use stackalloc to reduce heap allocation, it is considered "unfair"?

Neo-vortex avatar Nov 22 '22 08:11 Neo-vortex

How exactly is making use of a language feature "unfair"?

jcotton42 avatar Sep 16 '23 22:09 jcotton42

@hanabi1224 It's not C#'s fault that some languages don't have the ability to do stack allocations. If using struct is considered to be cheating, should all those C++, Go and Rust code stop using struct right now and instead using a pointer and do malloc everywhere?

While if you don't want to change your mind, then do make sure you won't use the primitive types which may be introduced in a future version of Java by the Valhalla project because it's also "cheating" in your definition.

hez2010 avatar Sep 17 '23 05:09 hez2010