4 ms·
With respect to all, I feel this is all missing the point. Expecting a compiler to remove dups just isn't sensible when you can do it yourself so easily on the
by throwaway_pdp09 6y ago
With respect to all, I feel this is all missing the point. Expecting a compiler to remove dups just isn't sensible when you can do it yourself so easily on the generation side. Just drop the AST/equivalent data structure into a hash table, with a quick exists check before you add the next one. Those that match, turn that code into a sub-function which all the rest call.
- rwmj 6y agoI think we can all be right. A benefit of generating the code is that this deduplication is much easier than if all the code was hand-written (especially w.r.t keeping the code updated as new API functions get added).