On 6/21/2023 1:41 PM, Axel Kittenberger wrote:
On Wed, Jun 21, 2023 at 12:04 PM Taco Hoekwater <[email protected]> wrote:

Using dummy data doesn’t help I believe, because you then need to check
the memory pointer against the dummy pointer instead of against NULL. That
should not be helpful.


Albeit the idea was to be branch less in the function that is a bottleneck,
you are right, I threw something like this together (buggy, it will crash
on an unknown symbol) albeit it compiled the test that on the other hand
did indeed not help at all, even very slightly slower (likely due to
initialization time of the dummy variables)
I checked the HIGH being array patch and indeed it gains max about 1% on the pure text ipsum test; in practice pages are of course not that full so i see no real gain on a regular 400 page document. Other optimizations probaly make that it's not more, but in a more realistic test it's also more likely that there are more cache misses anyway if the cache is sort of small).

But even little gain is some gain so I suppose we can patch it indeed.

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

Reply via email to