aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-07-09 20:50:09 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-07-09 20:50:09 +0300
commitd05afa9e368ca8a94d831445a488c89da6825801 (patch)
tree86e99594691c51c4fbc71b7670a4ea897a2d4f64
parente874ddb8cee278eded7611cecbc8b2b086e3d6c9 (diff)
downloadbcgen-d05afa9e368ca8a94d831445a488c89da6825801.tar.gz
bcgen-d05afa9e368ca8a94d831445a488c89da6825801.zip
add note about potential future optimization
-rwxr-xr-xbcgen3
1 files changed, 3 insertions, 0 deletions
diff --git a/bcgen b/bcgen
index e972709..12937db 100755
--- a/bcgen
+++ b/bcgen
@@ -321,6 +321,9 @@ class BCGen:
# kind of ugly but simplifies gen_select_instance a fair bit
self.select.append('if (0) {}\n')
+ # we could potentially just calculate the wanted label directly and skip
+ # the huge number of if statements, potentially giving us a slight
+ # compile time speedup
for r0 in self.place(fmt, 0):
for r1 in self.place(fmt, 1):
for r2 in self.place(fmt, 2):