Hacker News new | ask | show | jobs
by mraleph 3031 days ago
> completely neglected code maintainability

Where did I neglect maintainability as a factor? The only optimization that potentially affects maintainability is manually allocating Mapping-s in the typed array. And there I openly acknowledged that it affects readability and makes the code error prone. All other optimizations are not in any way affecting maintainability.

Even typed array optimization is purely confined in the library internals... On the other hand WASM spills out of the library by requiring users to explicitly destroy SourceMapConsumer.

1 comments

Turning a function into a string and back is also a reduction in maintainability, as programmers now have to be sure it doesn't use any captured variables or such, in future edits. Using a Uint8Array and integer constants rather than a string and character constants makes the code harder to read. Separating the sorting pass and doing some of it lazily (for good performance reasons) makes the final ordering slightly less clear.

But "completely neglected code maintainability" is definitely unfair. While you made changes that reduced maintainability, you weren't neglectful.