https://bugs.openldap.org/show_bug.cgi?id=10406

--- Comment #4 from Ben Alex <[email protected]> ---
Thanks for your benchmark code and giving me a few days to try it.

Your original code (using mdb_put) showed no regression, which initially
puzzled me. However, I noticed our Java benchmark uses cursor operations,
whereas your code uses mdb_put directly. When I modified your benchmark to use
mdb_cursor_put instead (the only change), the regression appeared:

Benchmark Results (ms per operation):

Version         C (ms)          Java (ms)       C vs 0.9.17     Java vs 0.9.17
===============================================================================
0.9.17          56              75.79           baseline        baseline
0.9.18          57              74.91           +0.7%           -1.2%
0.9.19          58              81.40           +3.6%           +7.4%
0.9.20          66              83.46           +16.7%          +10.1%
0.9.21          63              83.24           +11.3%          +9.8%
0.9.22          66              83.03           +17.8%          +9.5%
0.9.23          63              82.87           +12.3%          +9.3%
0.9.24          64              82.95           +13.7%          +9.5%
0.9.27          64              82.99           +14.2%          +9.5%
0.9.28          64              83.02           +12.7%          +9.5%
0.9.29          62              83.06           +10.6%          +9.6%
0.9.30          66              83.24           +16.9%          +9.8%
0.9.31          64              88.42           +13.4%          +16.7%
0.9.33          66              83.30           +17.5%          +9.9%

The regression patterns match closely between C and Java when cursor operations
are used.

Modified benchmark code is attached. The only changes from your original are:
- Added MDB_cursor *cursor = NULL;
- Replaced mdb_put(txn, dbi, &key, &data, MDB_APPEND) with cursor equivalent
- Open/close cursor around the batch (maintaining your 1,000 entry transaction
pattern)

Thank you for your help in tracking this down.

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to