I wrote 2 performance testing minimal HTTP servers, one for tide (1.6) and one for Node.JS, what I expect is that the tide one should faster than the Node.JS one. But the result is the opposite..., anyone has a try on this?:)
Testing environment:
macOS 10.14.6
Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz [ 6 cores ]
rustc 1.50.0 (cb75ad5db 2021-02-10)
Here are the source code for both versions:
Both HTTP server have the same routes and responses below:
Here is my ulimit -a output:
Maximum size of core files created (kB, -c) 0
Maximum size of a processճ data segment (kB, -d) unlimited
Maximum size of files created by the shell (kB, -f) unlimited
Maximum size that may be locked into memory (kB, -l) unlimited
Maximum resident set size (kB, -m) unlimited
Maximum number of open file descriptors (-n) 1000000
Maximum stack size (kB, -s) 8192
Maximum amount of cpu time in seconds (seconds, -t) unlimited
Maximum number of processes available to a single user (-u) 3546
Maximum amount of virtual memory available to the shell (kB, -v) unlimited
Here is the test result:
I wrote 2 performance testing minimal HTTP servers, one for
tide(1.6) and one forNode.JS, what I expect is that thetideone should faster than theNode.JSone. But the result is the opposite..., anyone has a try on this?:)Testing environment:
Here are the source code for both versions:
Both HTTP server have the same routes and responses below:
HTMLresponse (Benchmark testing) for the default route/:JSONresponse for the/json-benchmarkroute:{ "name":"Wison Ye", "role":"Administrator", "settings":{ "prefer_language":"English", "reload_when_changed":true } }Here is my
ulimit -aoutput:Here is the test result:
NodeJS version:
recreate node project:
Node spwan 6 cluster workers to serve:
Rust version:
recreate node project: