Re:&& operator chains (and ||, possibly) generates unoptimiz...
by PoignardAzur on Monday March 29, 2021 @05:47PM
(#26628632)
Not to be like your judgmental friends, but if you're going to use the approach that gives optimizations for free, why not just target WebAssembly / LLVM IR / Cranelift IR?
[ Parent
| on HN ]
Re:&& operator chains (and ||, possibly) generates unoptimiz...
by gnulinux on Monday March 29, 2021 @08:10PM
(#26629900)
Because I don't know web assembly, llvm ir. I'm pretty experienced in C++ and Haskell and they have "good enough" performance for my toy projects, so why complicate things?
Besides you can compile C++ to webAssembly and llvm ir. (don't know about cranelift).
Re:&& operator chains (and ||, possibly) generates unoptimiz...
by tom_mellior on Monday March 29, 2021 @06:38PM
(#26629187)
On the other hand, why yes? The OP found something that works for them and seems to give them the level of optimization they want. Presumably they also know C++ well, but possibly none of the technologies you mention well enough to "just" target them.