Recently, I wanted to learn to make generators that are able to create some small seamless worlds for a game. Long time ago I would think: how on earth people do that? Here's what I came up with now...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The Fibonacci numbers in JavaScript. | |
* | |
* A cached solution with O(1) lookup for previously-calculated terms and O(N) | |
* lookup for uncalculated ones. | |
* | |
* Because numbers in JavaScript are 64bit, the largest available number is | |
* 1.7976931348623157e+308. The 1476th term is the last that can be calculated. | |
* If a later term is requested, the function will return Infinity. | |
* |
In my previous article I covered what's ECS in overall, and what's ECSY, some other tools and potential bottlenecks.
In this article I'll cover some in-depth benchmarks of what I built and play around it a bit.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git update-index --chmod=+x your_script.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git config --unset core.hooksPath | |
ln -s -f ../../.pre-commit.sh .git/hooks/pre-commit |