Tezad is pezad's puzzle game project, written in Go. It still has quite a lot of polishing ahead of it, but at least the game is playable (besides not knowing where the boundaries are). Take a look:
![]() |
The latest version of Tezad, built on Go 1.7. Look at me almost get a home run, or a quadruple, or whatever the non-infringing name would be! |
Go 1.7 supposedly has a compiler that will make smaller and faster binaries, and will do this faster than previous versions of Go. Let's try it out!
I can test the compile times and binary sizes easily enough, but the game doesn't yet have an automated benchmarking tool. What it does have is unit test for core parts of the game logic, all running parallel. So, I ran a bash script to build Tezad in a loop n times, and another script to loop over running the tests n times as well.
Turns out they weren't lying! Take a look:
Go Version | 1.6 | 1.7 | diff | ratio |
Total build time sec | 63.283 | 57.426 | -5.857 | 90.74% |
Total builds | 25 | 25 | 0 | 100.00% |
Avg build time sec | 2.53132 | 2.29704 | -0.23428 | 90.74% |
Tezad size bytes | 5055696 | 4531984 | -523712 | 89.64% |
Tezad size MiB | 4.821487427 | 4.322036743 | -0.4994506836 | 89.64% |
Total test time sec | 91.836 | 70.13 | -21.706 | 76.36% |
Total tests | 25 | 25 | 0 | 100.00% |
Avg test time sec | 3.67344 | 2.8052 | -0.86824 | 76.36% |
Build time improved over 9%, size of the binary improved over 10%, and the time to run the tests improved over 24%. Not too shabby for not changing a single line of code!
(As an aside, you may be wondering what happened to Tezad since you saw it around 2010 or so. That was the C++ version. The new one is a complete rewrite. Code isn't yet available to the public, but someday it should be.)
No comments:
Post a Comment