Add a tiny optimization in a hot code area #17

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@mabrek

This comment has been minimized.

Show comment
Hide comment
@mabrek

mabrek Apr 24, 2012

Do you have some benchmarks or test case that show results of the optimisation?
I did something similar in https://github.com/mabrek/epgsql/blob/async/src/pgsql_wire.erl#L39 , but didn't compare decoding speed because it wasn't a bottleneck in my case.

mabrek commented on d80619f Apr 24, 2012

Do you have some benchmarks or test case that show results of the optimisation?
I did something similar in https://github.com/mabrek/epgsql/blob/async/src/pgsql_wire.erl#L39 , but didn't compare decoding speed because it wasn't a bottleneck in my case.

This comment has been minimized.

Show comment
Hide comment
@arcusfelis

arcusfelis Apr 26, 2012

Owner

It was something like 32% of the execution time was in the decode_stringfunction.
My code decreased it to 28%. Not so much.
I did not tested the code with binary:split, but it can be even more slow. :/

Owner

arcusfelis replied Apr 26, 2012

It was something like 32% of the execution time was in the decode_stringfunction.
My code decreased it to 28%. Not so much.
I did not tested the code with binary:split, but it can be even more slow. :/

@arcusfelis arcusfelis closed this Dec 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment