2 ms·
Ugh. There are languages that encourage this kind of time wasting. Avoid them. Also, > Exhibit A, in some cases, performs the ‘mod‘ 3 and ‘mod‘ 5 tests more th
by dottedmag 4y ago
Ugh. There are languages that encourage this kind of time wasting. Avoid them. Also,
> Exhibit A, in some cases, performs the ‘mod‘ 3 and ‘mod‘ 5 tests more than once
Isn't Haskell a language with controlled side-effects? Compiler ought to see that the same operation is performed twice and factor it out. There are no mutable variables in the scope.
- mrkeen 4y ago> Compiler ought to see that the same operation is performed twice and factor it out. Yes but the trouble is when Haskell does optimisations, it's criticised for having unpredictable performance characteristics.