tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] vectorize the curent hash implementation


From: KHMan
Subject: Re: [Tinycc-devel] vectorize the curent hash implementation
Date: Sat, 23 Apr 2016 17:55:33 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 4/23/2016 4:26 PM, Vladimir Vissoultchev wrote:
[snip snip snip]
(Note: SSE calc loop oversteps input string so file buffer has to
overallocated by 8 bytes in `tcc_open_bf`)

Unfortunately there was no noticable improvement, which leads me to beleave
that hash calculation is not the main culprit for the performance of
`next_nomacro1`

IIRC there are fast LZ compressors that are trying to use vector registers to speed up hashing. But those have nice and small inner loops.

But compilers branch all over the place, there are no nice inner loops to let L1 caches go hot-rodding, there are many data dependencies which limit a CPU's ability to schedule multiple ops. Branch and cache mispredictions are like train crashes these days.

Perhaps someone can test the limits on one of those academic CPU simulators that has an 'oracle' cache setting. How much speed can we further squeeze? I'm not optimistic there is a lot of performance left to squeeze...

-----Original Message-----
From: Tinycc-devel On Behalf Of Sergey Korshunoff
Sent: Saturday, April 23, 2016 10:38 AM
To: address@hidden
Subject: [Tinycc-devel] vectorize the curent hash implementation

Hi!
IMO, the way to go w/ performance improvement is to vectorize the curent
hash implementation. Instead of computing the hash one character at a time,
take next 4 characters, process these in parallel and compute 4 hashes

How to implement this?
There is some hash optimization for the tcc compiled by gcc.
https://github.com/seyko2/tinycc/commit/b89f0d63af4f494a83c91fb0360d7d37c0f6
f9a3

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia




reply via email to

[Prev in Thread] Current Thread [Next in Thread]