[Github-comments] [geany/geany] Aggressively cache line height for computing margin sizes (b08ae0f)

Colomban Wendling notifications at xxxxx
Fri Feb 5 12:02:10 UTC 2021


Yeah instead of hashing I could have 4 cache variables "just" compare that (font, size, zoom and ascent+descent).  Indeed that would avoid clashes, and it only requires keeping one copy of the previous font string around, and I guess the memory impact is probably not relevant.

I'm not sure it'd be much faster, but possibly.  The advantage I see with the hash approach is that it makes it simpler as there's a single comparison instead of 4 to combine, and only one value to keep, instead of having the 4 prev + 4 old ones.

I'll check, but I don't think speed matters -- clash might be relevant though.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786107
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210205/b141b2cf/attachment.htm>


More information about the Github-comments mailing list