Guess the language by the error
Jan. 29th, 2020 08:37 pmVlad found a good bug in SICP-JS: https://juan-gandhi.dreamwidth.org/4681686.html?thread=126995414#cmt126995414.
So, I went ahead and implemented both merge and mul_merge versions in JS. My versions looked drastically different:
I thought maybe my implementation of streams is dumb. ( what the heck? )
So, I went ahead and implemented both merge and mul_merge versions in JS. My versions looked drastically different:
$ time node a.js // using merge, take 40 real 0m4.581s user 0m4.332s sys 0m0.386s
$ time node b.js // using mul_merge, take 40 real 0m0.261s user 0m0.245s sys 0m0.034s
I thought maybe my implementation of streams is dumb. ( what the heck? )