jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
const letter_obj = {"a":true,"b":true,"c":true,"d":true,"e":true,"f":true,"g":true,"h":true,"i":true,"j":true,"k":true,"l":true,"m":true,"n":true,"o":true,"p":true,"q":true,"r":true,"s":true,"t":true,"u":true,"v":true,"w":true,"x":true,"y":true,"z":true,"A":true,"B":true,"C":true,"D":true,"E":true,"F":true,"G":true,"H":true,"I":true,"J":true,"K":true,"L":true,"M":true,"N":true,"O":true,"P":true,"Q":true,"R":true,"S":true,"T":true,"U":true,"V":true,"W":true,"X":true,"Y":true,"Z":true}
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
const letter_map = new Map([["a",true],["b",true],["c",true],["d",true],["e",true],["f",true],["g",true],["h",true],["i",true],["j",true],["k",true],["l",true],["m",true],["n",true],["o",true],["p",true],["q",true],["r",true],["s",true],["t",true],["u",true],["v",true],["w",true],["x",true],["y",true],["z",true],["A",true],["B",true],["C",true],["D",true],["E",true],["F",true],["G",true],["H",true],["I",true],["J",true],["K",true],["L",true],["M",true],["N",true],["O",true],["P",true],["Q",true],["R",true],["S",true],["T",true],["U",true],["V",true],["W",true],["X",true],["Y",true],["Z",true]])
const letter_arr = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
const letter_set = new Set(letter_arr)
Ready to run.
Test | Ops/sec | |
---|---|---|
字符串includes |
| ready |
数组includes |
| ready |
对象 in |
| ready |
对象key直接访问 |
| ready |
map判断 |
| ready |
字符串indexOf |
| ready |
set结构判断 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.