新的fcontext测试对比多线程性能大约提升11%
ucontext
Concurrency Level: 100
Time taken for tests: 10.829 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 48314024 bytes
HTML transferred: 23500000 bytes
Requests per second: 9234.44 [#/sec] (mean)
Time per request: 10.829 [ms] (mean)
Time per request: 0.108 [ms] (mean, across all concurrent requests)
Transfer rate: 4356.96 [Kbytes/sec] received
fcontext
Concurrency Level: 100
Time taken for tests: 10.063 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 48313336 bytes
HTML transferred: 23500000 bytes
Requests per second: 9937.07 [#/sec] (mean)
Time per request: 10.063 [ms] (mean)
Time per request: 0.101 [ms] (mean, across all concurrent requests)
Transfer rate: 4688.41 [Kbytes/sec] received
3.5.21.16生产版本,看来拿3.6.0开发版本对比生产版本果然是,,,毕竟生产版本有jemalloc高性能加持
Concurrency Level: 100
Time taken for tests: 7.525 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 48381928 bytes
HTML transferred: 23500000 bytes
Requests per second: 13288.51 [#/sec] (mean)
Time per request: 7.525 [ms] (mean)
Time per request: 0.075 [ms] (mean, across all concurrent requests)
Transfer rate: 6278.55 [Kbytes/sec] received
两个3.6开发版对比,,确实强了一丢丢,感觉是误差,测了几次结果大概5-7%左右提升
感觉可能是编译没有启用-DCMAKE_BUILD_TYPE=Release选项导致的,启用后在测了一次,,,发现结果依旧一样没区别,性能比3.5.21.16下降了30%左右性能
3.5.21.16
Concurrency Level: 100
Time taken for tests: 7.234 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 24644184 bytes
HTML transferred: 0 bytes
Requests per second: 13823.46 [#/sec] (mean)
Time per request: 7.234 [ms] (mean)
Time per request: 0.072 [ms] (mean, across all concurrent requests)
Transfer rate: 3326.83 [Kbytes/sec] received
ucontext
Concurrency Level: 100
Time taken for tests: 9.313 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 24616784 bytes
HTML transferred: 0 bytes
Requests per second: 10738.10 [#/sec] (mean)
Time per request: 9.313 [ms] (mean)
Time per request: 0.093 [ms] (mean, across all concurrent requests)
Transfer rate: 2581.42 [Kbytes/sec] received
fcontext
Concurrency Level: 100
Time taken for tests: 9.349 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 24604296 bytes
HTML transferred: 0 bytes
Requests per second: 10696.76 [#/sec] (mean)
Time per request: 9.349 [ms] (mean)
Time per request: 0.093 [ms] (mean, across all concurrent requests)
Transfer rate: 2570.18 [Kbytes/sec] received