-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Engines
-
13
-
StorEng - Defined Pipeline
I found in the WiredTiger code that the usage of prefix/postfix increment/decrement operator is not consistent. Though there are a lot of discussions and documents/blogs that explain why the prefix increment/decrement operator is efficient in C+, in terms of performance, "++i" is sometimes faster than "i++" and is never slower than "i++". For types like int, it doesn't matter: "++i" and "i++" are the same speed because I thought the compiler would take care of these. I experimented with WiredTiger code to make it consistent and ran too many high-value workload sys-perf tests and found that there are some improvements in YCSB workloads (although some numbers are surprising for me).
I ran all the WiredTiger tests, including performance tests, stress tests, MongoDb tests just to make sure it was not affecting the correctness. Below are the details of all the tests.
Here is the sys-perf results
Sys-Perf-Run1.
Sys-Perf-Run2.
Sys-Perf-Run3
Sys-Perf-Run4
Here is the patch build for the full run of WiredTiger tests - https://spruce.mongodb.com/version/65f44995be54e60007f7a582/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
Here is the patch build for the full run of MongoDB tests - https://spruce.mongodb.com/version/65f63ba65255660007507685/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
Here is the WiredTiger performance test runs -
Run1
Run2
Run3
Run4