Oh, one of these once more ;)
Im not sure what they are comparing there? General speed, in how less lines the code fits or what?
' BazzBasic version 1.4c ' https://ekbass.github.io/BazzBasic/ [inits]"><a href="https://ekbass.github.io/BazzBasic/ [inits]">https://ekbass.github.io/BazzBasic/ [inits] </a> LET fizz$ = "Fizz" LET buzz$ = "Buzz" LET fizzBuzz$ LET TIMER# = TICKS [main] FOR i$ = 1 to 1000 fizzBuzz$ = "" IF MOD(i$, 3) = 0 THEN fizzBuzz$+= fizz$ END IF IF MOD(i$, 5) = 0 THEN fizzBuzz$+= buzz$ END IF IF i$ <> "" THEN PRINT i$; ": "; fizzBuzz$ END IF NEXT PRINT TICKS - TIMER# END ' 35ms via powershell ' 42ms via cli
Though every now and then, similar topics appears, those actually has next to nothing to do with the speed of the language. Except goin through FizzBuzz algo.
mopser wrote it all in two lines there. While it is possible, I personally do not uderstand why it should be done so.
dim s$[4],n$:s[0]="":s[1]="fizz":s[2]="buzz":s[3]="fizzbuzz" for i=1 to 101:n=s[((i mod 3)=0)+2*((i mod 5)=0)]:if n="" then:print i;:end if:print n:next
Gives me a headache to read that one ;D
My 35 ms / 42 ms comes almost entirely from PRINT calls and process startup — the loop calculation itself is within a thousandth of a revolution of measurement error. Nobody controls the iron, the warm-up, or what is actually being measured (ditching+running or just running). So the numbers mostly tell you how heavy the I/O path of each interpreter is, not the "speed" of the language.