1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 18:17:48 -05:00
denoland-deno/cli/tools/coverage
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
..
json_types.rs chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
merge.rs refactor: remove usages of map_or / map_or_else (#18212) 2023-03-15 17:46:36 -04:00
mod.rs perf(core) Reduce script name and script code copies (#18298) 2023-03-21 22:33:12 +00:00
range_tree.rs chore: add copyright_checker tool and add the missing copyright (#17285) 2023-01-13 16:51:32 +09:00