"outperforming" is multi-faceted
-
-
Replying to @slightlylate @BRIAN_____ and
For this particular crypto case it'd be good to know specifics. What's the size and shape of the issue before and after WASM.
1 reply 0 retweets 1 like -
Replying to @jaffathecake @BRIAN_____ and
WASM doesn't change anything other than that people who were C/C++ folks were sold a "minimal changes" bill of goods.
1 reply 0 retweets 2 likes -
Replying to @slightlylate @jaffathecake and
WASM is a capability in the sense that getting half your CPU back is a capability. In a tight loop, that's transformative. It changes nothing about the ecosystem outside that tight loop.
1 reply 0 retweets 5 likes -
Replying to @slightlylate @BRIAN_____ and
Right, so it's worth learning more about cases where that becomes better than native implementations
1 reply 0 retweets 2 likes -
Replying to @jaffathecake @BRIAN_____ and
Native vs. non-native isn't meaningful. It's about scheduling; who makes sure that the "ui thread" (a convention loosely enforced) remains responsive? What measures are taken to enforce it? At what cost?
1 reply 0 retweets 2 likes -
Replying to @slightlylate @BRIAN_____ and
I guess I'm more interested in cases where WASM is better than native in a dedicated worker.
1 reply 0 retweets 1 like -
Replying to @jaffathecake @BRIAN_____ and
Would like to understand these as well. I suspect that arguments for synchronous behavior discount network time implicitly and in ways that are not flattering...but use cases matter. If you're building git and hashes are everything, it's perhaps an open question.
1 reply 0 retweets 3 likes -
Replying to @slightlylate @jaffathecake and
Almost every crypto API is synchronous. generally do network I/O asynchronously & crypto synchronously. Only when there's a large batch of asymmetric crypto operations (e.g. X.509 cert validation) is anything made async. This is how your (and every) browser works, for example.
1 reply 0 retweets 0 likes -
Replying to @BRIAN_____ @slightlylate and
Although I shouldn't have to say so, we're all aware of jank. It's an issue for network I/O threads too, not just UI responsiveness (network I/O jank ultimately leads to UI jank) and we wouldn't do it this way if it were actually problematic.
1 reply 0 retweets 0 likes
Suggestion: Pick your max acceptable latency for a blocking op. Take your worst-performing (mobile) device. Measure how many crypto ops (e.g. 1KB SHA-256, 4KB AES-GCM) operations you can do within that window. You can approximate this by just running `bssl speed` on your laptop.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.