[Lazarus] IsFontNameDefault talk

Juha Manninen juha.manninen62 at gmail.com
Sun Jun 4 14:52:54 CEST 2017


On Sun, Jun 4, 2017 at 3:36 PM, Alexey via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> you tell that "if LowerCase(s)='default'"
> works faster than "if CompareText(s,'default')", but most of the fonts, dont
> start with letter "d" or "de"=> so CompareText takes one char only,
> LowerCase takes n chars=> LowerCase slower.

Yes, actually I realized the same thing.
What more, CompareText() is well optimized and converts ASCII chars
quickly one by one.
I can change the code later to use CompareText().

Another thing is that GUI + font handling itself is slow compared to a
string comparison which makes this issue rather philosophical...

Juha


More information about the Lazarus mailing list