4 ms·
In D you can opt into specific float algorithms locally rather than a compiler flag. Use of fast math can really really really bite you sometimes, so just bein
by mhh__ 4y ago
In D you can opt into specific float algorithms locally rather than a compiler flag.
Use of fast math can really really really bite you sometimes, so just being able to opt into using fma and nothing else is awesome.
- adgjlsfhk1 4y agoYeah, Julia has this also (via a @fastmath macro). It's incredibly nice to be able to apply it safely.
- p0nce 4y agoI've measured it on real workload twice with LDC and each time "@fastMath" made things 1% slower. Of course this varies from backend to backend, but such woes would be avoided if the flag was named differently than "fast". It doesn't seem worth it to use it.
- mhh__ 4y agoI got a good speed up in [insert work project here] but that was more of an experiment since it isn't really performance constrained in the first place.