4 ms·
> You're acting like this is a gotcha, but the answer is obviously "all of them" and that indeed, this tells you interesting things about the behavior of your c
by Hizonner 10mo ago
> You're acting like this is a gotcha, but the answer is obviously "all of them" and that indeed, this tells you interesting things about the behavior of your compiler.
They tell me interesting things if I know enough about the language to know the difference. It tells me things if I'm getting into the weeds with Haskell specifically. That doesn't make the big comparison chart useful in any way.
I still don't know anything that lets me compare anything with any other language unless I actually know that language nearly as well. And I definitely don't get much out of a long list of languages, most of which I know not at all or at most at a "hello world" level, with only a couple of the entries tagged with even minimal information about compilers or their configurations at all. Especially when, on top of that, I don't know how much the person writing the test code knew.
At most I get "this language does a pretty good/poor job on this type of task when given code that may or may not be what a 'native expert' would write.".
And that's not news. Nobody (with any sophistication) would write that code for real in Python, or probably in Haskell either, because most seasoned programmers know that if you want speed on a task like that, you write it in a more traditional compiled procedural language. It's also not a kind of code that most people write to begin with. If you want an arctangent (which is really what it's doing), you use the library function, and the underlying implementation of that is either handcrafted C, or, more likely, a single, crafted CPU instruction with some call handling code wrapped around it.
So what is the overall chart giving me that I can use?
- ajross 10mo ago> So what is the overall chart giving me that I can use? "If you write in C or an analog, your math will autovectorize nicely" "If you use a runtime with a managed heap, you're likely to take a penalty even on math stuff that doesn't look heap limited" "rust 1.92 is, surprisingly, well behind clang on autovectorizable code" I mean, I think that stuff is interesting. > If you want an arctangent (which is really what it's doing), you use the library function If you just want to call library functions, you're 100% at the mercy of whatever platform you picked[1]. So sure, don't look at benchmarks, they can only prove you wrong. [1] Picked without, I'll note, having looked carefully at cross-platform benchmarks before having made the choice! Because you inexplicably don't think they tell you anything useful.