1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 17:19:06 -05:00
denoland-deno/core/examples
Matt Mastracci 0b4770fa7d
perf(core) Reduce script name and script code copies (#18298)
Reduce the number of copies and allocations of script code by carrying
around ownership/reference information from creation time.

As an advantage, this allows us to maintain the identity of `&'static
str`-based scripts and use v8's external 1-byte strings (to avoid
incorrectly passing non-ASCII strings, debug `assert!`s gate all string
reference paths).

Benchmark results:

Perf improvements -- ~0.1 - 0.2ms faster, but should reduce garbage
w/external strings and reduces data copies overall. May also unlock some
more interesting optimizations in the future.

This requires adding some generics to functions, but manual
monomorphization has been applied (outer/inner function) to avoid code
bloat.
2023-03-21 22:33:12 +00:00
..
http_bench_json_ops fix(core): remove async op inlining optimization (#17899) 2023-02-23 19:50:15 +00:00
disable_ops.rs feat(core): allow specifying name and dependencies of an Extension (#17301) 2023-01-08 23:48:46 +01:00
eval_js_value.rs perf(core) Reduce script name and script code copies (#18298) 2023-03-21 22:33:12 +00:00
fs_module_loader.rs refactor(core): pass cwd explicitly to resolve_path (#18092) 2023-03-13 18:50:23 +01:00
hello_world.rs feat(core): allow specifying name and dependencies of an Extension (#17301) 2023-01-08 23:48:46 +01:00
panik.rs feat(core): allow specifying name and dependencies of an Extension (#17301) 2023-01-08 23:48:46 +01:00
schedule_task.rs refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
ts_module_loader.rs perf(core) Reduce script name and script code copies (#18298) 2023-03-21 22:33:12 +00:00
wasm.js chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
wasm.rs feat(core): allow specifying name and dependencies of an Extension (#17301) 2023-01-08 23:48:46 +01:00
wasm.ts chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00