const template = {
  test: 1.array: [1.2.3.4.5.6].array1: [1.2.3.4.5.6].array2: [1.true."string".4.5.6].array3: [1.2.3.4.111112312312.6].array4: [1.2.3.4.5.6].jsonstring: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".jsonstring1: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".jsonstring2: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".jsonstring3: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".jsonstring4: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".jsonstring5: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".jsonstring6: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".jsonstring7: "asflajsdlf; ajsldfjals; Djfzxxxslk2.2342".a: true};const tempString =
  "sa; lfjasl; fjl; 21348lzxcjvlkzjlqjwepruoiuytoiqwyen,xzbcv,zbmxuiwqyerklashdfkla.,czxoupwlqerlas.dfm";
const now = +new Date(a);// JSON conversion test
// for (let i = 0; i < 1000000; i++) {
// JSON.parse(JSON.stringify(template));
// }
// node 1788ms
// deno 1939ms

// Digital computation test
// for (let i = 0; i < 1000000; i++) {
// for (let j = 0; j < 10000; j++) {
// const result = (i + j + j * i + j / i - i) ^ j;
/ /}
// }
// node: 8713ms
// deno: 5406ms

// Random string lookup
// for (let i = 0; i < 100000000; i++) {
// const charIndex =
// Math.floor(Math.random() * tempString.length) % tempString.length;
// const char = tempString[charIndex];
// const idx = tempString.indexOf(char);
// }
// node 1362ms
// deno 1369ms

// Fibonacci sequence test
// function fibonacci(n) {
// if (n == 0) return 0;
// else if (n == 1) return 1;
// else return fibonacci(n - 1) + fibonacci(n - 2);
// }

// fibonacci(43);
// node 5770ms
// deno 6214ms
console.log("Take.", +new Date() - now);
Copy the code

After doing some of the above test cases, it was found that deno’s performance was not yet ahead of Node’s.

It’s only mathematically advantageous.

HTTP IO is not tested because, according to the documentation, it is 25000 and Node is 35000 because node implements the underlying layer in C.

If you have better performance test comparison use cases, please send them!!

Also, in my opinion, the only advantage deno has right now is supporting TS.