Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(encoding/varint): deprecate Wasm implementation in favour of native TypeScript #3215

Merged
merged 4 commits into from
Feb 28, 2023
Merged

refactor(encoding/varint): deprecate Wasm implementation in favour of native TypeScript #3215

merged 4 commits into from
Feb 28, 2023

Conversation

iuioiua
Copy link
Collaborator

@iuioiua iuioiua commented Feb 23, 2023

This change replaces the Wasm implementation of encoding/varint with a native-TypeScript implementation ported from the x/varint module by @keithamus.

My benchmarks show that this implementation is 2x slower than its Wasm predecessor. However, the benefit is the implementation is simpler, and a step in CI is removed.

This PR supersedes #3213.

Ref:

@iuioiua iuioiua changed the title refactor(encoding/varint): deprecate Wasm implementation and use native TypeScript refactor(encoding/varint): deprecate Wasm implementation in favour of native TypeScript Feb 23, 2023
@iuioiua iuioiua marked this pull request as ready for review February 23, 2023 06:10
@iuioiua iuioiua requested a review from kt3k as a code owner February 23, 2023 06:10
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iuioiua
Copy link
Collaborator Author

iuioiua commented Feb 26, 2023

@lino-levan, WDYT?

@lino-levan
Copy link
Contributor

The wasm varint was always a nightmare. The decision seems pretty clear to me (thanks for the benchmark!). I don't see a lot of downsides to this change. LGTM!

@kt3k kt3k merged commit 11069b8 into denoland:main Feb 28, 2023
@iuioiua iuioiua deleted the refactor-varint-2 branch February 28, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants