perf(core): async op pseudo-codegen and performance work (#18887)

Performance:

```
async_ops.js: 760k -> 1030k (!)
async_ops_deferred.js: 730k -> 770k
Deno.serve bench: 118k -> 124k
WS test w/ third_party/prebuilt/mac/load_test 100 localhost 8000 0 0: unchanged

Startup time: approx 0.5ms slower (13.7 -> 14.2ms)
```
This commit is contained in:
Matt Mastracci 2023-04-30 10:50:24 +02:00 committed by GitHub
parent 9c8ebce3dc
commit bb1f5e4262
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 737 additions and 237 deletions

View file

@ -23,10 +23,16 @@ declare namespace Deno {
/**
* List of all registered ops, in the form of a map that maps op
* name to internal numerical op id.
* name to function.
*/
const ops: Record<string, (...args: unknown[]) => any>;
/**
* List of all registered async ops, in the form of a map that maps op
* name to function.
*/
const asyncOps: Record<string, (...args: unknown[]) => any>;
/**
* Retrieve a list of all open resources, in the form of a map that maps
* resource id to the resource name.