no memory fragmentation V8 employs a stop-the-world, generational, accurate, garbage collector. This means that V8: • stops program execution when performing a garbage collection cycle. • processes only part of the object heap in most garbage collection cycles. This minimizes the impact of stopping the application. • always knows exactly where all objects and pointers are in memory. This avoids falsely identifying objects as pointers which can result in memory leaks. https://developers.google.com/v8/design
second: 20.14 [#/sec] (mean) Time per request: 198.607 [ms] (mean) Transfer rate: 614.08 [Kbytes/sec] received Percentage of the requests served within a certain time (ms) 50% 197 66% 217 75% 233 80% 242 90% 266 95% 297 98% 326 99% 341 100% 391 (longest request) NODE_ENV=production node app.js ab -n 400 -c 4 http://localhost:3001/ Requests per second: 24.84 [#/sec] (mean) Time per request: 161.041 [ms] (mean) Transfer rate: 790.19 [Kbytes/sec] received Percentage of the requests served within a certain time (ms) 50% 150 66% 174 75% 193 80% 201 90% 233 95% 259 98% 296 99% 312 100% 343 (longest request) 在production下樣板引擎會將樣板變成函數放在記憶體裡