Skip to content

Commit

Permalink
Update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
GoogleFeud committed Mar 24, 2024
1 parent 2029153 commit 929ba9f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions perf/src/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,24 @@ group("Typeof Number", () => {
});

group("Typeof Boolean", () => {
bench("Typeof Bumber", () => {
bench("true and false checks", () => {
let counter = 0;
for (const data of allData3) {
if (typeof data !== "boolean") counter++;
if (data !== false && data !== true) counter++;
}
});

bench("Typeof number", () => {
let counter = 0;
for (const data of allData3) {
if (typeof data === "number") counter++;
}
});

bench("true and false checks", () => {
bench("Typeof boolean", () => {
let counter = 0;
for (const data of allData3) {
if (data !== false && data !== true) counter++;
if (typeof data !== "boolean") counter++;
}
});
});
Expand Down

0 comments on commit 929ba9f

Please sign in to comment.