Fwd: Re: Branchless implementation for literal case – is it worth it?

Sorry, I forgot to answer to the list. If the code is already there and some architectures can profit of it, especially in inner loops - why not just make it an optimisation flag? Nicu Am 20.04.2015 um 16:41 schrieb Joachim Breitner:
Hi,
2015-04-19 9:44 GMT+02:00 Joachim Breitner
: [...] So my question to the general audience: Is such branchless code really better than the current, branching code? Can someone provide us with an example that shows that it is better? Do I need to produce different branchless assembly? [...] Just a few war stories regarding this from the trenches (= Chrome's JavaScript JIT):
Am Montag, den 20.04.2015, 16:29 +0200 schrieb Sven Panne: thanks a lot.
The conclusion I draw from your mail, at last for our case, is: Don’t bother (and keep the compiler code simple). Is that a correct reading?
Greetings, Joachim
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Hi, Am Montag, den 20.04.2015, 19:45 +0200 schrieb Niculae Ionita:
Sorry, I forgot to answer to the list.
ah, and sorry for telling you so before looking on the list.
If the code is already there and some architectures can profit of it, especially in inner loops - why not just make it an optimisation flag?
Without even one good example where it is an improvement, this does not make sense. And even with an example: It degrades performance in other cases, so a module-wide flag would probably not cut it. Greetings, Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/

| > If the code is already there and some architectures can profit of it, | > especially in inner loops - why not just make it an optimisation flag? | | Without even one good example where it is an improvement, this does not | make sense. And even with an example: It degrades performance in other | cases, so a module-wide flag would probably not cut it. Moreover code complexity in the compiler carries a real cost. Don't underestimate it! Simon
participants (3)
-
Joachim Breitner
-
Niculae Ionita
-
Simon Peyton Jones