From 81c465c49a6d224a9e1e2dd8b220ba2a5693dd66 Mon Sep 17 00:00:00 2001 From: tilleul Date: Sun, 17 Jul 2022 21:59:44 +0200 Subject: [PATCH] Update README.md --- applesoft/nfs/README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/applesoft/nfs/README.md b/applesoft/nfs/README.md index 194ed09..bd9bb47 100644 --- a/applesoft/nfs/README.md +++ b/applesoft/nfs/README.md @@ -22,15 +22,16 @@ then, there might be a chance that it ends up fast enough to be enjoyable. Applesoft: The Need For Speed is a series of articles that explain why some coding techniques are faster than others. ## Summary -* **[Methodology](#methodology)**: learn how I've compared code snippets' speed -* **General tips** - 1. [Use variables as placeholders for constant values](general/01_variables_for_constants.md): accessing a known value in a variable is faster than deciphering values in code. - 2. [Declare your most used variables first](general/02_declare_most_used_variables_first.md): create and/or reference the variables you're going to use the most as soon as possible - 3. [Use one-letter variables names whenever possible](general/03_use_one_letter_variables_names.md): longer variables names take longer to parse. - 4. [Never use integer variables](04_never_use_integer_variables.md): they are always slower to use than float variables -- **Calculations** - 1. [Use addition instead of multiplication by 2](calculations/01_use_addition_instead_of_mul2.md): double addition of the same variable is faster than multiplying the variable by 2 - 2. [Addition is faster than subtraction](calculations/02_addition_is_faster_than_subtraction.md): avoid subtraction whenever possible but don't use negative constants. +### Methodology +1. [Methodology explained](#methodology): learn how I've compared code snippets' speed +### General tips +1. [Use variables as placeholders for constant values](general/01_variables_for_constants.md): accessing a known value in a variable is faster than deciphering values in code. +2. [Declare your most used variables first](general/02_declare_most_used_variables_first.md): create and/or reference the variables you're going to use the most as soon1 as possible +3. [Use one-letter variables names whenever possible](general/03_use_one_letter_variables_names.md): longer variables names take longer to parse. +4. [Never use integer variables](04_never_use_integer_variables.md): they are always slower to use than float variables, even when you think they're not +### Calculations +1. [Use addition instead of multiplication by 2](calculations/01_use_addition_instead_of_mul2.md): double addition of the same variable is faster than multiplying the variable by 2 +2. [Addition is faster than subtraction](calculations/02_addition_is_faster_than_subtraction.md): avoid subtraction whenever possible but don't use negative constants. (and many others) coming soon...