Closed srolel closed 8 years ago
Those benchmarks are using seamless-immutable
's development build (they must be, since the prod build wouldn't pass the tests he posted), and the development build goes out of its way to freeze things and bans mutating methods.
The production build doesn't do these things. It's very close to "using plain old arrays and objects" in terms of performance, and I don't feel like trying to do better than that is a good goal for the library. 😄
Thanks for the post!
@rtfeldman: just FYI, docs were updated to use production seamless-immutable, claims it's still faster:
My benchmark code is here: https://github.com/guigrpa/timm/blob/master/tools/benchmarks.js
In principle I'm using the Production build, so I was also surprised by the results, but they seem to be consistent in Windows and OS X. I don't know the reason for the slow array results.
Of course, if the benchmarks are wrong I will publish the updated results!
That's cool! @guigrpa I appreciate your showing your work. 😸
so, is seamless-immutable really that slow?
I would like to use seamless-immutable in production after reviewing the options for implementing immutability. One of the libraries I looked at was timm. The author suggests that seamless has performance issues and provides a benchmark.