0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 01:44:26 -05:00
deno/cli/tsc/dts
Nayeem Rahman 5dbf5c8293
fix(bench): explicit timers don't force high precision measurements (#20272)
Disables `BenchContext::start()` and `BenchContext::end()` for low
precision benchmarks (less than 0.01s per iteration). Prints a warning
when they are used in such benchmarks, suggesting to remove them.

```ts
Deno.bench("noop", { group: "noops" }, () => {});

Deno.bench("noop with start/end", { group: "noops" }, (b) => {
  b.start();
  b.end();
});
```

Before:
```
cpu: 12th Gen Intel(R) Core(TM) i9-12900K
runtime: deno 1.36.2 (x86_64-unknown-linux-gnu)

file:///home/nayeem/projects/deno/temp3.ts
benchmark                    time (avg)        iter/s             (min … max)       p75       p99      p995
----------------------------------------------------------------------------- -----------------------------


noop                          2.63 ns/iter 380,674,131.4    (2.45 ns … 27.78 ns)   2.55 ns   4.03 ns   5.33 ns
noop with start and end     302.47 ns/iter   3,306,146.0     (200 ns … 151.2 µs)    300 ns    400 ns    400 ns

summary
  noop
   115.14x faster than noop with start and end
```

After:
```
cpu: 12th Gen Intel(R) Core(TM) i9-12900K
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)

file:///home/nayeem/projects/deno/temp3.ts
benchmark                    time (avg)        iter/s             (min … max)       p75       p99      p995
----------------------------------------------------------------------------- -----------------------------


noop                          3.01 ns/iter 332,565,561.7    (2.73 ns … 29.54 ns)   2.93 ns   5.29 ns   7.45 ns
noop with start and end       7.73 ns/iter 129,291,091.5    (6.61 ns … 46.76 ns)   7.87 ns  13.12 ns  15.32 ns
Warning start() and end() calls in "noop with start and end" are ignored because it averages less than 0.01s per iteration. Remove them for better results.

summary
  noop
   2.57x faster than noop with start and end
```
2023-08-26 11:29:45 +02:00
..
lib.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.decorators.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.decorators.legacy.d.ts fix: upgrade to TypeScript 5.0.3 (#18532) 2023-03-31 17:09:04 +00:00
lib.deno.ns.d.ts fix(bench): explicit timers don't force high precision measurements (#20272) 2023-08-26 11:29:45 +02:00
lib.deno.shared_globals.d.ts fix(dts): make globals available on globalThis (#19438) 2023-07-03 14:36:55 -04:00
lib.deno.unstable.d.ts feat(unstable): Improve FFI types (#20215) 2023-08-21 13:36:26 +05:30
lib.deno.window.d.ts fix(dts): make globals available on globalThis (#19438) 2023-07-03 14:36:55 -04:00
lib.deno.worker.d.ts fix(dts): make globals available on globalThis (#19438) 2023-07-03 14:36:55 -04:00
lib.dom.asynciterable.d.ts chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
lib.dom.d.ts fix: add missing URL.canParse() types (#20244) 2023-08-23 09:31:13 +02:00
lib.dom.extras.d.ts fix(dts): make globals available on globalThis (#19438) 2023-07-03 14:36:55 -04:00
lib.dom.iterable.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00
lib.es5.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00
lib.es6.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.collection.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00
lib.es2015.core.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00
lib.es2015.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.generator.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.iterable.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.promise.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.proxy.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.reflect.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.symbol.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2015.symbol.wellknown.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2016.array.include.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2016.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2016.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2017.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2017.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2017.intl.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2017.object.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2017.sharedmemory.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2017.string.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2017.typedarrays.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2018.asyncgenerator.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2018.asynciterable.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2018.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2018.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2018.intl.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2018.promise.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2018.regexp.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2019.array.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2019.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2019.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2019.intl.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2019.object.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2019.string.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2019.symbol.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.bigint.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00
lib.es2020.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.date.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.intl.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.number.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.promise.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.sharedmemory.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.string.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2020.symbol.wellknown.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2021.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2021.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2021.intl.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2021.promise.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2021.string.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2021.weakref.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.array.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.error.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.intl.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00
lib.es2022.object.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.regexp.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.sharedmemory.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2022.string.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2023.array.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2023.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.es2023.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.esnext.array.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.esnext.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.esnext.full.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.esnext.intl.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.scripthost.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.webworker.d.ts fix: add missing URL.canParse() types (#20244) 2023-08-23 09:31:13 +02:00
lib.webworker.importscripts.d.ts feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
lib.webworker.iterable.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00
typescript.d.ts feat: upgrade to TypeScript 5.1.6 (#19695) 2023-07-04 00:36:35 +02:00