Am Mon, 8 Apr 2013 22:37:33 +1000 schrieb Manu <[email protected]>:
> > Only builtins are pure in the sense of 'C'. Even functions > > considered PUREstrong by the frontend may update an internal state, > > so the rules just don't apply. Except for maybe global > > functions... In any case, the only benefit you can reap from 'D > > pure' functions are that they are more likely to be const-folded / > > inlined. > > > > Oh my god... ..... this is the most upsetting thing I've heard all > day! :( No really, I have been SOOOO excited for so long about this > optimisation potential in D! > There's gotta be something that can be done! >_< And to make it even worse AFAICT D's nothrow is also meaningless for optimization. As you can still throw errors/throwables the backend gains nothing from nothrow. It still has to analyze a function to know if it is actually __NOTHROW__ in the gcc sense. I think there was at least one gdc bug related to this which only showed on ARM, but I'd have to check that again. http://bugzilla.gdcproject.org/show_bug.cgi?id=10 (Though admittedly I'm not sure if there's any optimization potential with nothrow)
