diff options
author | Monty <monty@mariadb.org> | 2016-01-30 00:11:27 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-02-07 10:34:03 +0200 |
commit | 076aa182c2d2ee67c233d0e79c900dfba6f593c1 (patch) | |
tree | 2b11bac55700470e4c5c041a9c500526c818abe9 /include/myisampack.h | |
parent | 2ebc2eef8a901f5f48a21c9ce02c889a57f7e6b7 (diff) | |
download | mariadb-git-076aa182c2d2ee67c233d0e79c900dfba6f593c1.tar.gz |
Optimized intkorr() and intstore(functions) for intel 64 bits.
(Benchmarked, about 30 % faster and 50 % smaller than original)
Diffstat (limited to 'include/myisampack.h')
-rw-r--r-- | include/myisampack.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/myisampack.h b/include/myisampack.h index 0795455dc3e..cfe1fcbc24a 100644 --- a/include/myisampack.h +++ b/include/myisampack.h @@ -52,11 +52,16 @@ (((uint32) (((const uchar*) (A))[2])) << 8) +\ (((uint32) (((const uchar*) (A))[1])) << 16) +\ (((uint32) (((const uchar*) (A))[0])) << 24))) + +#ifndef HAVE_mi_uint5korr #define mi_uint5korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[4])) +\ (((uint32) (((const uchar*) (A))[3])) << 8) +\ (((uint32) (((const uchar*) (A))[2])) << 16) +\ (((uint32) (((const uchar*) (A))[1])) << 24)) +\ (((ulonglong) (((const uchar*) (A))[0])) << 32)) +#endif /* HAVE_mi_uint5korr */ + +#ifndef HAVE_mi_uint6korr #define mi_uint6korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[5])) +\ (((uint32) (((const uchar*) (A))[4])) << 8) +\ (((uint32) (((const uchar*) (A))[3])) << 16) +\ @@ -64,6 +69,9 @@ (((ulonglong) (((uint32) (((const uchar*) (A))[1])) +\ (((uint32) (((const uchar*) (A))[0]) << 8)))) <<\ 32)) +#endif /* HAVE_mi_uint6korr */ + +#ifndef HAVE_mi_uint7korr #define mi_uint7korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[6])) +\ (((uint32) (((const uchar*) (A))[5])) << 8) +\ (((uint32) (((const uchar*) (A))[4])) << 16) +\ @@ -72,6 +80,9 @@ (((uint32) (((const uchar*) (A))[1])) << 8) +\ (((uint32) (((const uchar*) (A))[0])) << 16))) <<\ 32)) +#endif /* HAVE_mi_uint7korr */ + +#ifndef HAVE_mi_uint8korr #define mi_uint8korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[7])) +\ (((uint32) (((const uchar*) (A))[6])) << 8) +\ (((uint32) (((const uchar*) (A))[5])) << 16) +\ @@ -81,6 +92,7 @@ (((uint32) (((const uchar*) (A))[1])) << 16) +\ (((uint32) (((const uchar*) (A))[0])) << 24))) <<\ 32)) +#endif /* HAVE_mi_uint8korr */ /* This one is for uniformity */ #define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A) |