Hi, couldn't do this earlier, please excuse for being so late. I played with the test-pgm and modified it a bit. You can find my version here: https://drive.google.com/file/d/0B4h65dJSL95DXzdpaUNGYTQ5cVk/edit?usp=sharin... I also modified the definitions in myisampack.h and did some tests with a table with 10 mio records in it (1 GB in size) to see the effect of the modifications. You will find my results at the end of the source-code. At a first look the uintXkorr looks like a waste of time but the modified versions do not have much effect on the whole process. Regards AugustQ On So, 2014-01-26 at 19:28 +0400, Alexey Botchkov wrote:
Thanks for the suggestions, Kristian. I for some reason didn't notice that __builtin_bswap things.
Best regards. HF
23.01.2014 19:51, Kristian Nielsen wrote:
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
Do it like this: static inline ulonglong mi_uint6korr(const void *p) { uint32 a= *(uint32 *)p; uint16 b= *(uint16 *)(4+(char *)p); ulonglong v= ((ulonglong)a | ((ulonglong)b << 32)) << 16; asm ("bswapq %0" : "=r" (v) : "0" (v)); return v; } Note that GCC also has __builtin_bswap64() (and __builtin_bswap32()). They also generate bswap instruction, but would also work on other platforms...
- Kristian.
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp