Author :
Martin Mitas
Date :
2016-11-07 20:50:11
Hash :1ba03589 Message :md_collect_marks: Optimize the function.
Use character map for a fast path and minimize count of branches for
specially handled characters.
When profiling md2html on a larger documents with output redirected to
/dev/null to mitigate I/O, this function was quite a bottleneck.
It consummed about 33% of CPU cycles on a longer document input, with
this patch applied it drops down to 12%.