After I compiled my project for profiling and opened the profile_results.txt, I can see that nimDecRefIsLast consumes a significant part of the calls and time.
What would you look for in the code if you had results like this? (I admit I haven't yet spent any time in optimizations; I rather decided to make the whole thing work, first. But still not bad to start looking at different things...)
A (rather long) sample of the aforementioned profile_results.txt:
total executions of each stack trace:
Entry: 1/438 Calls: 177/2384 = 7.42% [sum: 177; 177/2384 = 7.42%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 2/438 Calls: 158/2384 = 6.63% [sum: 335; 335/2384 = 14.05%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 3/438 Calls: 115/2384 = 4.82% [sum: 450; 450/2384 = 18.88%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 4/438 Calls: 108/2384 = 4.53% [sum: 558; 558/2384 = 23.41%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 5/438 Calls: 85/2384 = 3.57% [sum: 643; 643/2384 = 26.97%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 6/438 Calls: 68/2384 = 2.85% [sum: 711; 711/2384 = 29.82%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 7/438 Calls: 38/2384 = 1.59% [sum: 749; 749/2384 = 31.42%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
Strings.nim: :anonymous 1891/2384 = 79.32%
nre.nim: replace 171/2384 = 7.17%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 8/438 Calls: 22/2384 = 0.92% [sum: 771; 771/2384 = 32.34%]
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 9/438 Calls: 20/2384 = 0.84% [sum: 791; 791/2384 = 33.18%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
Strings.nim: :anonymous 1891/2384 = 79.32%
nre.nim: replace 171/2384 = 7.17%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 10/438 Calls: 19/2384 = 0.80% [sum: 810; 810/2384 = 33.98%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 11/438 Calls: 19/2384 = 0.80% [sum: 829; 829/2384 = 34.77%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 12/438 Calls: 16/2384 = 0.67% [sum: 845; 845/2384 = 35.44%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 13/438 Calls: 14/2384 = 0.59% [sum: 859; 859/2384 = 36.03%]
hashes.nim: rotl32 81/2384 = 3.40%
hashes.nim: murmurHash 168/2384 = 7.05%
hashes.nim: hash 194/2384 = 8.14%
hashcommon.nim: rawGet 344/2384 = 14.43%
tables.nim: [] 227/2384 = 9.52%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 14/438 Calls: 12/2384 = 0.50% [sum: 871; 871/2384 = 36.54%]
hashes.nim: murmurHash 168/2384 = 7.05%
hashes.nim: hash 194/2384 = 8.14%
hashcommon.nim: rawGet 344/2384 = 14.43%
tables.nim: [] 227/2384 = 9.52%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 15/438 Calls: 12/2384 = 0.50% [sum: 883; 883/2384 = 37.04%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
Strings.nim: :anonymous 1891/2384 = 79.32%
nre.nim: replace 171/2384 = 7.17%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 16/438 Calls: 11/2384 = 0.46% [sum: 894; 894/2384 = 37.50%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 17/438 Calls: 11/2384 = 0.46% [sum: 905; 905/2384 = 37.96%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 18/438 Calls: 11/2384 = 0.46% [sum: 916; 916/2384 = 38.42%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 19/438 Calls: 10/2384 = 0.42% [sum: 926; 926/2384 = 38.84%]
strmantle.nim: eqStrings 91/2384 = 3.82%
hashcommon.nim: rawGet 344/2384 = 14.43%
tables.nim: [] 227/2384 = 9.52%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 20/438 Calls: 10/2384 = 0.42% [sum: 936; 936/2384 = 39.26%]
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 21/438 Calls: 10/2384 = 0.42% [sum: 946; 946/2384 = 39.68%]
hashes.nim: rotl32 81/2384 = 3.40%
hashes.nim: murmurHash 168/2384 = 7.05%
hashes.nim: hash 194/2384 = 8.14%
hashcommon.nim: rawGet 344/2384 = 14.43%
tables.nim: [] 227/2384 = 9.52%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 22/438 Calls: 10/2384 = 0.42% [sum: 956; 956/2384 = 40.10%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 23/438 Calls: 10/2384 = 0.42% [sum: 966; 966/2384 = 40.52%]
hashes.nim: rotl32 81/2384 = 3.40%
hashes.nim: murmurHash 168/2384 = 7.05%
hashes.nim: hash 194/2384 = 8.14%
tables.nim: rawGet 344/2384 = 14.43%
tables.nim: hasKey 141/2384 = 5.91%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 24/438 Calls: 10/2384 = 0.42% [sum: 976; 976/2384 = 40.94%]
hashes.nim: murmurHash 168/2384 = 7.05%
hashes.nim: hash 194/2384 = 8.14%
hashcommon.nim: rawGet 344/2384 = 14.43%
tables.nim: [] 227/2384 = 9.52%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 25/438 Calls: 9/2384 = 0.38% [sum: 985; 985/2384 = 41.32%]
value.nim: == 1387/2384 = 58.18%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 26/438 Calls: 9/2384 = 0.38% [sum: 994; 994/2384 = 41.69%]
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 27/438 Calls: 9/2384 = 0.38% [sum: 1003; 1003/2384 = 42.07%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
value.nim: == 1387/2384 = 58.18%
value.nim: != 1391/2384 = 58.35%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
Entry: 28/438 Calls: 9/2384 = 0.38% [sum: 1012; 1012/2384 = 42.45%]
arc.nim: nimDecRefIsLast 729/2384 = 30.58%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
exec.nim: execBlock 1890/2384 = 79.28%
...: ... 1889/2384 = 79.24%
lib.nim: :anonymous 1891/2384 = 79.32%
exec.nim: doExec 1891/2384 = 79.32%
vm.nim: run 1892/2384 = 79.36%
The VM right now is pretty much proof of concept and hardly optimized. I guess I could bring it to more a competitive level with mainstream scripting languages, in the future. The main goal is to go totally self-hosted with an LLVM backend - but that's not my main concern right now.
What would suggest - instead of nimprof that is - for profiling on macOS Big Sur? (I've tried with valgrind, vtune and everything, but most of the tools seem tailored to linux. And although I could do it via some bridge, it still sounds like too much fuss)
Off-topic but the dynamic vs static typing debate is over and dynamic typing has objectively lost now.
Despite this uneven playing field, our central finding is that both static type systems find an important percentage of public bugs: both Flow 0.30 and TypeScript 2.0 successfully detect 15%
I guess every approach has its own trade-offs. One of the big advantages of a Rebol-ish language is its extreme flexibility. So, on one hand, you can do many (weird) things super-easily, but one the other hand, it has to be handled with... caution.
The debate is pretty much like compiled vs interpreted. There is something to gain and something to lose.
Personally, I started out considering every intepreted language as "not a real thing" (my first one was Pascal in 1993-1994 - not a great example, I know, but still a static typed compiled one), but slowly grew up to love them - especially since the machines they run on got better and better to the point that their lack in perfomance wasn't that significant anymore.
In any case, I think it boils down to the use case in mind.