Home / Highlights / FAQ / Examples / Quick Start / Roadmap / Download / About Us

Bolin compiles 2.5 million lines per second on a laptop (MacBook Air with an M2 chip)

You might wonder what's the point of compiling so fast?

First lets play a game. How fast can you react?
Touch and hold the square below. Let go when it becomes green.

Most people will score 250milliseconds give or take 50. When you interact with something (like the button to compile your code) any time less than your reaction time will have the interaction feel instant and a multiple of 2 or 3 will feel pretty fast. We'll get back to this after we look at how to reproduce these results.

Here is a toy script to generate test files. You can reproduce the test files by writing python3 multigen.py bolin 2000000 24. The 2000000 is the amount of array assigns so actual lines of code is higher. The script can produce C and Go if you like to test other compilers. Here's our result on a MacBook Air with an M2 chip using 2M array assigns.

time bolin -tcc -g /tmp/t/*.bolin

real	0m0.765s
user	0m3.835s
sys 	0m0.577s

Pretty good, there's some space before it'll take a full second. Lets see how many lines it'll compile to take 200, 400, 600 and 1000ms.

#300K
real	0m0.204s
user	0m0.857s
sys 	0m0.162s

#900K
real	0m0.388s
user	0m1.768s
sys 	0m0.300s

#1.5M
real	0m0.616s
user	0m2.893s
sys 	0m0.503s

#2.5M
real	0m0.965s
user	0m4.802s
sys 	0m0.730s

How big is your codebase? How large is your personal project? The above is going from source to a debuggable binary. With Bolin you'll likely not distract yourself during an edit compile test loop.