Closed ctemple closed 3 months ago
Not easily, no, we are currently keeping a instance of libloading::Library
behind it. It would make lib reload checks a little faster but are there any indications that this would really matter? micro benchmarks are one thing but in the context of this project it seems unclear if there is anything being gained from it.
Not easily, no, we are currently keeping a instance of
libloading::Library
behind it. It would make lib reload checks a little faster but are there any indications that this would really matter? micro benchmarks are one thing but in the context of this project it seems unclear if there is anything being gained from it.
For web applications, the performance of rwlock is sufficient. Now I want to use it in game servers with much higher call frequency. In this scenario, rwlock may be an issue
result from rust-lock-bench
==== num_reader: 20, num_writer: 0 ==== mutex => mean: 45.71, std_dev: 5.35 rwlock => mean: 134.71, std_dev: 17.67 prwlock => mean: 134.71, std_dev: 17.67 seq_cst => mean: 1.00, std_dev: 0.00 relaxed => mean: 1.00, std_dev: 0.00 unsync => mean: 1.00, std_dev: 0.00
==== num_reader: 19, num_writer: 1 ==== mutex => mean: 50.29, std_dev: 7.63 rwlock => mean: 113.71, std_dev: 19.61 prwlock => mean: 113.71, std_dev: 19.61 seq_cst => mean: 4.57, std_dev: 6.80 relaxed => mean: 3.00, std_dev: 2.65 unsync => mean: 1.57, std_dev: 1.51