Skip to content

Commit

Permalink
Change to target: es5 instead of es6
Browse files Browse the repository at this point in the history
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
winksaville committed Jun 12, 2017
1 parent fba15e5 commit 7d5f211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es6",
"target": "es5",
"module": "commonjs",
"moduleResolution": "Node",
"sourceMap": true
Expand Down

0 comments on commit 7d5f211

Please sign in to comment.