to do something, but that is not always the case. As an obvious example, optimizing compilers can generally do register allocation as well as humans could.
-
-
Replying to @BatmanAoD @mttkay and
No, they can't. To this day I still see compilers routinely screw up register allocation on code close or at the register limit. It is often not "zero cost", and that is why "zero cost" is a very bad term. It should be called "occasionally zero cost".
1 reply 1 retweet 5 likes -
Replying to @cmuratori @BatmanAoD and
And similarly, the fact that people think that register allocation is "zero cost" is another good example of why that phrase is bad. People should understand that there are currently either no or almost no truly "zero cost" abstractions.
1 reply 0 retweets 3 likes -
Replying to @cmuratori @BatmanAoD and
Many (all?) the things they think are free actually aren't free at all.
1 reply 0 retweets 1 like -
Replying to @cmuratori @mttkay and
I don't have experience actually writing assembly, but I can imagine there being cases where a human can hand-optimize register allocation better than some specific compiler, sure. So, to take a different example: what about generic monomorphization? Isn't that "free" at runtime?
1 reply 0 retweets 0 likes -
Replying to @BatmanAoD @cmuratori and
(...since it happens at compile time?) I.e., a monomorphized function call is equivalent to a non-polymorphic function call. So that seems truly zero-cost.
0 replies 0 retweets 0 likes -
This Tweet is unavailable.
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
Replying to @Jonathan_Blow @BatmanAoD and
Recently I realized is that all the purported benefits of "zero-cost" abstractions are about things other than the generated code itself (since that's supposed to be the identical). So if you're ignoring all those things, you might as well call them "zero-benefit" abstractions.
2 replies 0 retweets 0 likes
Yes, that is exactly how I feel about them @shachaf.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.