rizin icon indicating copy to clipboard operation
rizin copied to clipboard

Make `ht` and buffer reading faster

Open Rot127 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

In the callgrind of https://github.com/rizinorg/rizin/issues/4385 one can see that 30% execution time are due to ht_insert and 50% due to rz_buf_read_at. Since these functions are potentially used very often in algorithms (in this example debug symbol processing), they should be more efficient if possible.

Describe the solution you'd like

Check ht_insert and the read component of the IO layer for inefficiencies. At least for the hash table it might be even worth considering to replace it with another HT model. This talk is for C++, but maybe worth a watch.

Describe alternatives you've considered

Doing nothing and just try to minimize the buffer reading and ht usage. But this is not really practical and hard to code.

Additional context

None

Rot127 avatar Mar 25 '24 06:03 Rot127