C ++ hiding characters increase travel time

I am trying to optimize library loading time with over 200 dependencies. I tried to hide characters using visibility attributes, which led me to reduce the number of exported characters by 30%.

Looking at the histogram of the elf, after optimization, the number of buckets remains unchanged, but the successful and unsuccessful search has significantly decreased. The size of the flowering filter decreased from 8 kb to 4 kb, but the number of set bits increased from 19% to 24%.

Despite the fact that the download time has increased, and I think this is due to the number of bits set in the color filter higher than before.

Looking at the dependencies, I see that there are about 400,000 characters that, during the move, are viewed in my library without success. A flowering filter used to filter most of them, but the number of false positives increased from 3.6% to 5.76% due to the larger number of bits of sets (I found this formula on the Internet: false positive = bitsets% ^ 2)

Performing some mathematical calculations before optimization, I had to look for a false positive result in my 14.440 library, and after optimization this number increased to 23.040. Even if the unsuccessful search decreased from 1.7 to 1.1, the number of comparisons is even higher than before.

calgrind, , . 2% , , 1% ( ld strcmp 3575000 3617000).

, 50%. . - , 1,4 2 29% 8,4% .

, , ? , , % ? - , ?

+4
1

- .

direct binding .

.

- , ?

, , .

, .

0

Source: https://habr.com/ru/post/1611299/


All Articles