Closed alex closed 10 years ago
Good call. I'm probably going to the trivial peephole optimizer at some point, which will necessitate this optimization anyways. I'll figure out the Addb
and Decb
encodings, too -- it should be straightforward.
Awesome!
On Sun, Apr 27, 2014 at 9:28 AM, Nelson Elhage notifications@github.comwrote:
Good call. I'm probably going to the trivial peephole optimizer at some point, which will necessitate this optimization anyways. I'll figure out the Addb and Decb encodings, too -- it should be straightforward.
— Reply to this email directly or view it on GitHubhttps://github.com/nelhage/gojit/pull/2#issuecomment-41501190 .
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
INC and DEC are generally not preferred anymore (at least, not on Intel chips). Though they have shorter encodings, they introduce a false dependency on the carry flag, and thus lead to worse performance.