Category:Z80 Assembly: Difference between revisions

→‎Efficient Coding Tricks: Removed excessive Dr. Evil air quotes
(→‎Efficient Coding Tricks: Removed excessive Dr. Evil air quotes)
Line 50:
 
==Efficient Coding Tricks==
As with most assembly languages, there are techniques to abuse the "rules" of the CPU to squeeze out as much performance as you can. This can become a bit of a "game" to some people, to see how much they can optimize their code. There seems to be a law of nature when it comes to assembly programming, that anything you do to make your code faster takes up more memory, and vice versa. And trying to optimize either for speed or bytes will also make your code harder to read. It's unfortunate but it seems to be true more often than not. Thankfully, comments can make up for readability. Let's explore a few ways to make your code faster and/or more compact.
 
===Fast Checking for Odd or Even===
1,489

edits