1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00
denoland-deno/cli/tools/init/templates/main_bench.ts
sigmaSd 4eb8e875fd
feat(init): Generate main_bench.ts by default (#16786)
This commit changes "deno init" to generate "main_bench.ts" file
which scaffold two example bench cases.
2022-12-10 00:34:08 +01:00

9 lines
145 B
TypeScript

import { add } from "./main.ts";
Deno.bench(function addSmall() {
add(1, 2);
});
Deno.bench(function addBig() {
add(2 ** 32, 2 ** 32);
});