On 29/12/2021 13:42, Marco van de Voort via lazarus wrote:

On 29-12-2021 10:16, Martin Frb via lazarus wrote:

// Martin's routine that should be replaced by some punpkl magic, but it is too late now.

Why too late?

See datetime stamp.  02:10 AM. I don't know how it is with you Lazarus devels, but we FPC devels need our beauty sleep from time to time.
Oh, too late for the day.
I thought. Too late, that ship has sailed.



Could you post full source if you haven't already? For a bit of benchmarking. I just wrote it from the top of my head, and I assumed 5 instructions for 16-byte would win any time, but haven't verified anything yet.
I had it attached on my last mail. Attached it again here. (3rd procedure / "Utf8LengthAdd")

It is only 64bit for now. (And not cleaned up in any way).

Also changing "bc >> 7" and "bc and 127"
to "moddiv(bc, 255, full, remain)" might save a few more ms. But probably needs larger data to benchmark.


If you do work on this, feel free to integrate my code as the baseline for cpu without SSE.
Otherwise, it might be a bit until I get to it.

Attachment: Project1.pas
Description: application/unknown-content-type

-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to