@bontscho I'm very sorry for not getting to your PR in time! Took the same approach but adapted it so that it doesn't rely on Node-specific features, and instead works on typed array level so it works both in Node and the browser. Performance is about the same.
I also opted for doing the optimization by default, without any options — there seems to be no value in turning this off.
Coverage remained the same at 100.0% when pulling 6ba4756f19b92de5d9f619fb4b96ef89d4d27d4e on optimize-identical into 8a5683b7e85760275c94151ebc217522f83793a0 on master.
Closes #38. Closes #39 (being a replacement).
@bontscho I'm very sorry for not getting to your PR in time! Took the same approach but adapted it so that it doesn't rely on Node-specific features, and instead works on typed array level so it works both in Node and the browser. Performance is about the same.
I also opted for doing the optimization by default, without any options — there seems to be no value in turning this off.