File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,19 @@ logic required for wah.
22
22
# Could it be implemented in ClojureScript?
23
23
24
24
Sure! It might even already work in ClojureScript, I just haven't tried yet. PRs welcome!
25
+
26
+ # Why port Simple Statistics to WebAssembly?
27
+
28
+ Two reasons: speed is the most obvious, but the other is consistency.
29
+
30
+ As I've learned from talking to the [ stdlib] ( https://github.com/stdlib-js/stdlib ) project,
31
+ one of the things standing in the way from JavaScript being a great environment
32
+ for mathematical reasoning is that the mathematical builtins are inconsistent:
33
+ when you use ` Math.sin ` , it can use different estimations and have different
34
+ results in different JavaScript environments.
35
+
36
+ WebAssembly, instead, requires you to write your basics from scratch - even
37
+ just for the error function, I had to write ` Math.exp ` and ` Math.pow ` for myself.
38
+ But the rudimentary methods that it does support have guaranteed behavior. So
39
+ you can start lower and make better guarantees about the robustness of the system,
40
+ without making big sacrifices in performance.
You can’t perform that action at this time.
0 commit comments