mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
0910be4d64
Join two independent ops into one. A fast impl of one + a slow callback of another. Here's an example showing optimized paths for latin-1 via fast call and the next-best fallback using V8 apis. ```rust #[op(v8)] fn op_encoding_encode_into_fallback( scope: &mut v8::HandleScope, input: serde_v8::Value, // ... #[op(fast, slow = op_encoding_encode_into_fallback)] fn op_encoding_encode_into( input: Cow<'_, str>, // ... ``` Benchmark results of the fallback path: ``` time target/release/deno run -A --unstable ./cli/tests/testdata/benches/text_encoder_into_perf.js ________________________________________________________ Executed in 70.90 millis fish external usr time 57.76 millis 0.23 millis 57.53 millis sys time 17.02 millis 1.28 millis 15.74 millis target/release/deno_main run -A --unstable ./cli/tests/testdata/benches/text_encoder_into_perf.js ________________________________________________________ Executed in 154.00 millis fish external usr time 67.14 millis 0.26 millis 66.88 millis sys time 38.82 millis 1.47 millis 37.35 millis ``` |
||
---|---|---|
.. | ||
benches | ||
00_infra.js | ||
01_dom_exception.js | ||
01_mimesniff.js | ||
02_event.js | ||
02_structured_clone.js | ||
02_timers.js | ||
03_abort_signal.js | ||
04_global_interfaces.js | ||
05_base64.js | ||
06_streams.js | ||
06_streams_types.d.ts | ||
08_text_encoding.js | ||
09_file.js | ||
10_filereader.js | ||
11_blob_url.js | ||
12_location.js | ||
13_message_port.js | ||
14_compression.js | ||
15_performance.js | ||
blob.rs | ||
Cargo.toml | ||
compression.rs | ||
internal.d.ts | ||
lib.deno_web.d.ts | ||
lib.rs | ||
message_port.rs | ||
README.md | ||
timers.rs |
deno web
Op crate that implements Event, TextEncoder, TextDecoder and File API (https://w3c.github.io/FileAPI).
Testing for text encoding is done via WPT in cli/.