NRK wrote:
> On Wed, Jan 05, 2022 at 01:56:26AM +0600, NRK wrote:
> > Just curious, why not use:
> >
> > #if defined(__has_builtin) && __has_builtin(__builtin_expect)
> > #define likely(expr) __builtin_expect(!!(expr), 1)
> > #define unlikely(expr) __builtin_expect(!!(expr), 0)
> > #else
On Wed, Jan 05, 2022 at 01:56:26AM +0600, NRK wrote:
> Just curious, why not use:
>
> #if defined(__has_builtin) && __has_builtin(__builtin_expect)
> #define likely(expr) __builtin_expect(!!(expr), 1)
> #define unlikely(expr) __builtin_expect(!!(expr), 0)
> #else
> #define likely
> +#ifdef __has_builtin
> + #if __has_builtin(__builtin_expect)
> + #define likely(expr) __builtin_expect(!!(expr), 1)
> + #define unlikely(expr) __builtin_expect(!!(expr), 0)
> + #else
> + #define likely(expr) (expr)
> + #define unlikely(expr
commit e917e53a05de7cab2591d6b2fa3f2ce5ece89bcf
Author: Laslo Hunhold
AuthorDate: Tue Jan 4 18:56:38 2022 +0100
Commit: Laslo Hunhold
CommitDate: Tue Jan 4 18:56:38 2022 +0100
Mark likely branches
The likely() and unlikely() macros (known from the Linux kernel) in
src/ut
commit 10a95f711451bc653ba5d1f14c0f514e4d854c44
Author: Laslo Hunhold
AuthorDate: Tue Jan 4 18:47:06 2022 +0100
Commit: Laslo Hunhold
CommitDate: Tue Jan 4 18:47:06 2022 +0100
Use "#ifdef" instead of "#if defined"
Signed-off-by: Laslo Hunhold
diff --git a/benchmark/charact
commit 06013743a38729c531a67a63bbfd55b50badddfe
Author: Laslo Hunhold
AuthorDate: Tue Jan 4 18:11:02 2022 +0100
Commit: Laslo Hunhold
CommitDate: Tue Jan 4 18:37:33 2022 +0100
Add UTF-8 decoder benchmark
Here we can also see the trouble with the custom types in libutf8proc.
commit 602ae9b2041df6c7e2b1d9f9da2b5ae57eb94b64
Author: Laslo Hunhold
AuthorDate: Tue Jan 4 18:29:30 2022 +0100
Commit: Laslo Hunhold
CommitDate: Tue Jan 4 18:33:00 2022 +0100
Generate separate utf8proc_int32_t buffer to preserve strict aliasing
This clearly shows why it's n
commit e7b4a99ac11124212811a345563e65d199b1fb79
Author: Laslo Hunhold
AuthorDate: Tue Jan 4 18:10:09 2022 +0100
Commit: Laslo Hunhold
CommitDate: Tue Jan 4 18:10:09 2022 +0100
Generalize benchmark-function with payload-struct
Signed-off-by: Laslo Hunhold
diff --git a/bench