Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Almost ready to release LoomBASIC. Before I do, here’s a quick comparison. This isn’t meant to knock FastBasic in any way—FastBasic is an excellent, well‑designed language that’s been a huge inspiration. LoomBASIC simply takes a different approach in a few areas, and I want to highlight those differences for anyone deciding which tool fits their workflow.

 

Atari 8-Bit BASIC Speed Comparison

A performance comparison between FastBasic and LoomBASIC, using equivalent benchmark programs with no embedded assembly code.

Benchmark Results

CompilerArithmeticBranchingArrayTotal Ticks
FastBasic (INT)1,2281,1268583,212
FastBasic (FP)1,2281,1168583,202
FastBasic via ByteLoom1,2281,1268583,212
Native LoomBASIC352326263941

Lower tick counts indicate faster execution.

What Was Tested?

  • Arithmetic: 30,000 iterations of integer arithmetic.
  • Branching: 30,000 iterations involving conditional IF statements.
  • Arrays: 20,480 byte-array updates.
  • Correctness: All four programs produced identical expected checksums (30007, 61, 20480).

LoomBASIC Performance Improvement

TestSpeedup vs FastBasic INT
Arithmetic3.49× faster
IF branching3.45× faster
Array operations3.26× faster
Overall3.41× faster

Conclusion

In this benchmark, LoomBASIC completed the same workload approximately 3.4 times faster than compiled FastBasic, requiring about 71% fewer clock ticks.

FastBasic compiled directly and through ByteLoom Werx produced identical results. The FastBasic FP build performed nearly identically to the INT build; this test did not benchmark floating-point arithmetic.

All programs completed the same workloads and returned the same expected results.

These are preliminary synthetic benchmark results, not a claim that LoomBASIC is 3.4× faster in every application. Real-world performance will depend on program structure, graphics, I/O, and other operations.

 

 

And the code used to test in speedtest.lbas:

 

' Test 3 of 3: ByteLoom Werx v4.19 native LoomBASIC
' 100% BASIC source, no ASM blocks and no native engine calls.

DIM BUF(127) BYTE
WORD I,J,A,SUM,T0,T1,E1,E2,E3,TOTAL

GRAPHICS 0
PRINT "BASIC SPEED TEST"
PRINT "30K ARITH / 30K IF"
PRINT "20480 BYTE WRITES"
PRINT "TICKS: SMALLER=FASTER"
PRINT

' Test 1: 30000 iterations, two 16-bit arithmetic operations.
A=7
T0=PEEK(19)*256+PEEK(20)
FOR I=1 TO 30000
  A=A+3
  A=A-2
NEXT I
T1=PEEK(19)*256+PEEK(20)
E1=T1-T0
PRINT "ARITH TICKS ";E1
PRINT "CHECK A=";A

' Test 2: 30000 conditional paths.
A=1
T0=PEEK(19)*256+PEEK(20)
FOR I=1 TO 30000
  IF A>80
    A=A-79
  ELSE
    A=A+5
  ENDIF
NEXT I
T1=PEEK(19)*256+PEEK(20)
E2=T1-T0
PRINT "BRANCH TICKS ";E2
PRINT "CHECK B=";A

' Test 3: 160 x 128 = 20480 byte-array updates.
FOR I=0 TO 127
  BUF(I)=0
NEXT I
T0=PEEK(19)*256+PEEK(20)
FOR J=1 TO 160
  FOR I=0 TO 127
    BUF(I)=BUF(I)+1
  NEXT I
NEXT J
T1=PEEK(19)*256+PEEK(20)
E3=T1-T0
SUM=0
FOR I=0 TO 127
  SUM=SUM+BUF(I)
NEXT I
PRINT "ARRAY TICKS ";E3
PRINT "CHECK C=";SUM

TOTAL=E1+E2+E3
PRINT "TOTAL TICKS ";TOTAL
PRINT "EXPECTED 30007,61,20480"
PRINT "RESET TO EXIT"
DO
  PAUSE
LOOP