Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to target: es5 instead of es6
Using es5 is 6x faster! Here es6 runs at 75,000 eps: ``` $ yarn runit 1000000 yarn runit v0.24.6 $ yarn build && yarn doit 1000000 yarn build v0.24.6 $ tsc -p src/tsconfig.json Done in 1.97s. yarn doit v0.24.6 $ node build/test-nn.js 1000000 Epoch=1,000,000 Error=4.63e-7 time=13.17s eps=75,902 Pat Input0 Input1 Target0 Output0 0 0 0 0 0.00044897833262192035 1 1 0 1 0.9995443735793996 2 0 1 1 0.9995443229790881 3 1 1 0 0.0005559018544514654 Done in 13.34s. Done in 15.69s. ``` And es5 is 480,000 eps: ``` $ yarn runit 1000000 yarn runit v0.24.6 $ yarn build && yarn doit 1000000 yarn build v0.24.6 $ tsc -p src/tsconfig.json Done in 1.98s. yarn doit v0.24.6 $ node build/test-nn.js 1000000 Epoch=1,000,000 Error=4.63e-7 time=2.07s eps=482,894 Pat Input0 Input1 Target0 Output0 0 0 0 0 0.00044897833262192035 1 1 0 1 0.9995443735793996 2 0 1 1 0.9995443229790881 3 1 1 0 0.0005559018544514654 Done in 2.24s. Done in 4.60s. ```
- Loading branch information