aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/crypto.mjs
blob: b0b992a0ffa503dcee00f7e8ec2552d5558ba50e (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
// so it can run in environments without node module resolution
import { bench, run } from "../node_modules/mitata/src/cli.mjs";

var crypto = globalThis.crypto;

if (!crypto) {
  crypto = await import("node:crypto");
}

var foo = new Uint8Array(65536);
bench("crypto.getRandomValues(65536)", () => {
  crypto.getRandomValues(foo);
});

var small = new Uint8Array(32);
bench("crypto.getRandomValues(32)", () => {
  crypto.getRandomValues(small);
});

bench("crypto.randomUUID()", () => {
  // node uses a rope string for each hex byte so any subsequent operation after creating it is slow
  return crypto.randomUUID()[2];
});

await run();
e='restart-on-lock'>restart-on-lock Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/examples/with-markdown-plugins/add-classes.mjs (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-12-12Fix link in MDX integration README (#5586)Gravatar Chris Swithinbank 2-1/+6
2022-12-10Updated magic-string to 0.27.0 (#5577)Gravatar Martin J 3-3/+15
2022-12-10Update deno integration dependencies (#5573)Gravatar Lino Le Van 2-2/+2
2022-12-10[ci] formatGravatar matthewp 2-8/+8
2022-12-10Include base in 'page' stage injected scripts (#5572)Gravatar Matthew Phillips 4-9/+32
2022-12-09Add primevue as an external Vue package (#5571)Gravatar Matthew Phillips 2-1/+6
2022-12-09[docs] MDX README update (#5570)Gravatar Sarah Rainsberger 2-401/+65
2022-12-08[ci] formatGravatar natemoo-re 1-1/+3
2022-12-08Node: better serverEntrypoint error (#5560)Gravatar Nate Moore 2-4/+13
2022-12-08Update compiler (#5554)Gravatar Nate Moore 3-5/+10
2022-12-08docs: How to access base config in the app (#5482)Gravatar Alvin Bryan 1-0/+2
2022-12-08Improve README install guide (#5479)Gravatar Nyx Iskandar 1-2/+5
2022-12-08[ci] release (#5544)astro@1.6.14@astrojs/rss@1.1.0@astrojs/netlify@1.2.2@astrojs/deno@2.0.1@astrojs/cloudflare@4.1.1Gravatar Fred K. Bot 48-121/+121
2022-12-08[ci] formatGravatar matthewp 2-2/+4
2022-12-08fix: Error reporting fails on undefined error index (#5539)Gravatar wulinsheng123 2-1/+6
2022-12-08astro-rss: Generate feed with proper XML escaping (#5550)Gravatar Anders Kaseorg 5-36/+57
2022-12-08Fix Astro.params not having values when using base in SSR (#5553)Gravatar Matthew Phillips 6-4/+66
2022-12-07Allow all redirection status codes in redirect() (#5446)Gravatar Jeffrey Yasskin 2-1/+6
2022-12-06feat(astro-rss): generate post content in feed (#5366)Gravatar Ben Smith 4-1/+46
2022-12-06[ci] formatGravatar matthewp 2-7/+6
2022-12-06Use accumulated sort order when order production CSS (#5549)Gravatar Matthew Phillips 15-2/+180
2022-12-06[ci] formatGravatar matthewp 22-158/+171
2022-12-06Head propagation (#5511)Gravatar Matthew Phillips 36-279/+804
2022-12-06[ci] formatGravatar matthewp 1-7/+7
2022-12-06Removed premature optimization (#5548)Gravatar Ido S 2-37/+35
2022-12-06Exclude astro from Vite optimization (#5545)Gravatar Bjorn Lu 2-1/+6
2022-12-06bench workflow - use bash as shell (#5546)Gravatar Matthew Phillips 1-2/+4
2022-12-06bench workflow - pipe stderr (#5543)Gravatar Matthew Phillips 1-2/+4
2022-12-06Update esbuild dependency (#5534)Gravatar Bjorn Lu 7-18/+275
2022-12-06Fix tests with node 18 (#5528)Gravatar Bjorn Lu 1-9/+14