-
Notifications
You must be signed in to change notification settings - Fork 68
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
Introduce client.withCodecs() #1161
Conversation
339f2d2
to
ed1786d
Compare
// TODO: Figure out if we can drop the dep | ||
// on an external package for Float16Array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately not: only Deno, Firefox, and Safari support native Float16Array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can emulate is in a very very limited way the same way that third party library does. I just want us to "own" the type we'd be proxying through our API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, you mean basically vendor the existing library? We can also just use Float32Array
until there is better support for Float16Array
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked at that implementation, it's huge and complicated :/ Vendoring is an option
This will make a nicer foundation for the upcoming withCodecs API, as I plan to start passing Options into the codecs machinery. Along the way, I refactored Options to ensure they are fully immutable and use proper collections types. One specific thing I wanted to fix is avoiding using `=== defaults()` checks as they are flaky.
This can give a noticeable perf boost in a regular use case scenario.
This is a draft
ToDo:
setCustomCodecs