mirror of
https://github.com/denoland/deno.git
synced 2025-02-18 19:33:00 -05:00

This commit changes "deno init" to generate "main_bench.ts" file which scaffold two example bench cases.
9 lines
145 B
TypeScript
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);
|
|
});
|