aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/async-overhead.mjs
blob: 7af987bff0c54ac42bacf15523edcd0160effa6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { bench, run } from "mitata";

bench("noop", function () {});
bench("async function(){}", async function () {});
bench("await 1", async function () {
  return await 1;
});

function callnextTick(resolve) {
  process.nextTick(resolve);
}

function awaitNextTick() {
  return new Promise(callnextTick);
}

bench("promise.nextTick", async function () {
  return awaitNextTick();
});

bench("await new Promise(resolve => resolve())", async function () {
  await new Promise(resolve => resolve());
});
bench("Promise.all(Array.from({length: 100}, () => new Promise((resolve) => resolve())))", async function () {
  return Promise.all(Array.from({ length: 100 }, () => Promise.resolve(1)));
});

await run();
06bd3eae82c0c2ab4287710d555b926&follow=1'>build(deps): bump github.com/quic-go/quic-go from 0.35.1 to 0.37.3 (#6238)Gravatar dependabot[bot] 2-21/+19 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.35.1 to 0.37.3. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md) - [Commits](https://github.com/quic-go/quic-go/compare/v0.35.1...v0.37.3) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2023-08-07build(deps): bump github.com/aws/aws-sdk-go from 1.44.312 to 1.44.317 (#6241)Gravatar dependabot[bot] 2-3/+3 Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.312 to 1.44.317. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.312...v1.44.317) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2023-08-07build(deps): bump golang.org/x/crypto from 0.11.0 to 0.12.0 (#6242)Gravatar dependabot[bot] 2-12/+12 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.11.0 to 0.12.0. - [Commits](https://github.com/golang/crypto/compare/v0.11.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2023-07-31[RFC-9250]: Add QUIC server support (#6182)Gravatar João Henri 15-4/+759 Add DNS-over-QUIC server Signed-off-by: jaehnri <joao.henri.cr@gmail.com> Signed-off-by: João Henri <joao.henri.cr@gmail.com> 2023-07-31build(deps): bump google.golang.org/grpc from 1.56.2 to 1.57.0 (#6234)Gravatar dependabot[bot] 2-3/+3 2023-07-31update outdated blog links (#6231)Gravatar Yuheng 2-3/+3 Signed-off-by: chenyuheng <chenyuheng99@qq.com> 2023-07-31build(deps): bump google.golang.org/api from 0.132.0 to 0.134.0 (#6233)Gravatar dependabot[bot] 2-6/+6 2023-07-31build(deps): bump github.com/aws/aws-sdk-go from 1.44.300 to 1.44.312 (#6232)Gravatar dependabot[bot] 2-3/+3 2023-07-30implement Name function on secondary plugin (#6230)Gravatar Diogenes Pelisson 1-0/+3 Signed-off-by: Diogenes Pelisson <diogenes.pelisson@gmail.com> 2023-07-24build(deps): bump k8s.io/client-go from 0.27.3 to 0.27.4 (#6221)Gravatar dependabot[bot] 2-3/+3 Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.27.3 to 0.27.4. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.27.3...v0.27.4) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2023-07-24build(deps): bump google.golang.org/api from 0.131.0 to 0.132.0 (#6220)Gravatar dependabot[bot] 2-12/+12 Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.131.0 to 0.132.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.131.0...v0.132.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2023-07-24build(deps): bump k8s.io/api from 0.27.3 to 0.27.4 (#6222)Gravatar dependabot[bot] 2-7/+7 Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.27.3 to 0.27.4. - [Commits](https://github.com/kubernetes/api/compare/v0.27.3...v0.27.4) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2023-07-24build(deps): bump github.com/antonmedv/expr from 1.12.6 to 1.12.7 (#6218)Gravatar dependabot[bot] 2-3/+3 Bumps [github.com/antonmedv/expr](https://github.com/antonmedv/expr) from 1.12.6 to 1.12.7. - [Release notes](https://github.com/antonmedv/expr/releases) - [Commits](https://github.com/antonmedv/expr/compare/v1.12.6...v1.12.7) --- updated-dependencies: - dependency-name: github.com/antonmedv/expr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2023-07-17build(deps): bump github.com/aws/aws-sdk-go from 1.44.294 to 1.44.300 (#6209)Gravatar dependabot[bot] 2-3/+3 2023-07-17build(deps): bump github.com/prometheus/client_golang (#6205)Gravatar dependabot[bot] 2-6/+6 2023-07-17build(deps): bump github.com/antonmedv/expr from 1.12.5 to 1.12.6 (#6208)Gravatar dependabot[bot] 2-3/+3 2023-07-17build(deps): bump google.golang.org/api from 0.130.0 to 0.131.0 (#6207)Gravatar dependabot[bot] 2-24/+24 2023-07-121.11.0 release prep (#6135)Gravatar Chris O'Haver 2-1/+56 * add draft notes Signed-off-by: Chris O'Haver <cohaver@infoblox.com> Co-authored-by: Manuel Rüger <manuel@rueg.eu>