5 ms·
No, but on the other hand it doesn’t monomorphize generics and make the compiles dog slow and the binaries bloated :-)
by yawaramin 5y ago
No, but on the other hand it doesn’t monomorphize generics and make the compiles dog slow and the binaries bloated :-)
- andrepd 5y agoWell, but it does make the code slower
- yawaramin 5y agoI knew someone would say that :-) ‘Slower’ is super subjective. What is the actual performance requirement? And remember that the OP thread is talking about an extremely high-performance RPC system. Sure, it may not be as fast as C++, but again, what is the actual performance requirement. You don’t go around just throwing ‘Eh, not as fast as C++’ at everything you come across :-)
- rowanG077 5y agoHow is slower subjective? Performance of two pieces of code can be objectively measured. There is nothing subjective about it.
- yawaramin 5y agoWho cares? What use is measuring the objective performance difference between two solutions if no one cares about the difference? That’s why I’m talking about the actual performance requirement.
- krapht 5y agoThis is a pretty obnoxious way to tell me you don't work on real-time systems without explicitly saying you don't work on real-time systems.
- yawaramin 5y agoI didn't realize we were exclusively talking about real-time systems? Do you think people you argue with on HN are so dumb that they would go around claiming high-level GC languages are suitable for real-time systems?
- detaro 5y agoAsking about the actual requirement sounds very much like what you do in real-time systems, vs just being happy with "faster"?
- jolux 5y agoI feel like if your concern is real-time systems, you should probably say you don’t think it’s suitable for real-time systems, instead of talking about performance differences that no one really disagrees but which don’t matter in practice for most applications anyways.
- rowanG077 5y agoThat's an incredible arrogant and close minded way to think about software. There are plenty of domains where every extra % of performance matters. Video games, HFT, robotics etc.
- yawaramin 5y agoYeah, that's why I asked, who cares? If you care about it, then obviously you need it. Also, https://news.ycombinator.com/item?id=28283376 https://news.ycombinator.com/item?id=28283376
- gopiandcode 5y agoEven in these domains people still balance performance against the expressiveness of the language, or else why wouldn't everyone write their games/HFT/robotics in assembly for that "bare metal" performance? For example, many popular game engines provide C# scripting engines _even though_ using a garbage collected language (even just for scripting) is slow (and throwing away % of performance) because the performance is _good enough_ for their usecases.
- rowanG077 5y agoThat's because scripts in a game are not usually a performance bottleneck if kept to best practices. And you can bet your ass both unity and unreal have some ASM in their guts.
- gopiandcode 5y agoYes, my point exactly, and in the places where people use OCaml, the overhead from not monomorphising generics isn't a performance bottleneck.
- rowanG077 5y agoThat's a self fulfilling prophecy. Of course OCaml isn't used there... Because it can't hit the performance target.
- jcelerier 5y agoBut what when people care ? I work in a field where individuals regularly spend 4 to 5 figures for a new CPU for a half-percent of single-core performance improvement ; computers will literally never be fast enough for what we want to do with them so our job is to leave exactly zero possibility for improvement through software
- yawaramin 5y agoIf you care about it, then obviously go to town on optimization, use an FPGA, whatever. But I notice you said 'CPU', which means there is a performance/cost tradeoff even in your field. Otherwise wouldn't you be using specialized hardware? When we are talking about a general-purpose language like OCaml, then you come in talking about extreme HPC–you must realize it's not relevant in the discussion? Would you comment on threads about Golang talking about how it's not appropriate for HPC usecases?
- jcelerier 5y agoI mean, yes, FPGAs and dedicated hardware are researched and used in that field. The main reason CPUs are used "more" is due rather to convenience, and what people want to do not easily being doable on an FPGA ; for instance one of the often used programming languages there (Faust) just got an experimental FPGA port after 20+ years of existence. But when talking about performance the point is to extract the absolute most performance possible of a given hardware, because you are building a product and you can only afford a.g. some ARM chip and need to get the most out of it to make your product's price fit for its target demographic (to, you know, make money for your business). In particular, the main "competition" in that field is analog hardware which does not have "performance" issues (but others instead : an analog guitar distortion does not have latency but it does raise the noise floor in the signal) - everyone wants the best of both worlds and it is our job to make it happen
- rixed 5y agoPlease do not argue like that. I understand you are a fan of the language, I love the OCaml language myself. But pretending execution speed does not matter is disserving the cause, especially since many people came to OCaml because it's a great trade off between execution speed, expressivity and safety.
- yawaramin 5y agoPlease re-read my comment :-) Nowhere did I say: > execution speed does not matter What I actually said: what is the actual performance requirement? I don’t get why this is such a hard concept for people in this thread :-) Obviously you should use the right tool for the job! If you have extreme HPC requirements, no one (except maybe Jane Street) is going to use OCaml for that. It’s a high-level GC language! When you come into a thread, have some basic context about what it’s about.
- maattdd 5y ago"Slow" can be subjective indeed, but not "slower".