Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Of these languages, C# may actually be the fastest.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...



In most cases the later entries in a language for the benchmark game are increasingly hyper-optimized and non-idiomatic for that language, which is exactly where C# will say "Here's some dangerous features, be careful" and the other languages are likely to suggest you use a bare metal language instead.

Presumably the benchmark game doesn't allow "I wrote this code in C" as a Python submission, but it would allow unsafe C# tricks ?


Note: 'possible hand-written vector instructions or "unsafe" or naked ffi' are flagged by *

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Note: Here are naive un-optimised single-thread programs transliterated line-by-line literal style into different programming languages from the same original.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...


Unsafe C# is still C# though. Also C# has a lot more control over memory than Java for example, so you don't actually need to use unsafe to be fast. Or are you trying to say that C# is only fast when using unsafe?


Likely just that the fastest implementations in the benchmarks game are using those features and so aren't really a good reflection of the language as it is normally used. This is a problem for any language on the list, really; the fastest implementations are probably not going to reflect idiomatic coding practices.


Here are naive un-optimised single-thread programs transliterated line-by-line literal style into different programming languages from the same original.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: