Re: [Maria-developers] uint6korr optimization

2014-02-16 Thread AugustQ
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=sharing I also modified the definitions in myisampack.h and did some tests with a t

Re: [Maria-developers] uint6korr optimization

2014-01-26 Thread Alexey Botchkov
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 writes: Do it like this: static inline ulonglong mi_uint6korr(const void *p) { uint32 a= *(uint32 *)p; uint16

Re: [Maria-developers] uint6korr optimization

2014-01-23 Thread Kristian Nielsen
Kristian Nielsen 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; > }

Re: [Maria-developers] uint6korr optimization

2014-01-23 Thread Kristian Nielsen
Alexey Botchkov writes: > Only question i have with this is if there's a possibility to make the > hf_mi_uint6korr(dest,src) macro a function. > So we can write as usual > dest= hf_mi_uint6korr(src) > > Didn't find how that can nicely be done with the assembler code. Do it like this: static

Re: [Maria-developers] uint6korr optimization

2014-01-23 Thread Alexey Botchkov
Hi all. Only question i have with this is if there's a possibility to make the hf_mi_uint6korr(dest,src) macro a function. So we can write as usual dest= hf_mi_uint6korr(src) Didn't find how that can nicely be done with the assembler code. Best regards. HF 23.01.2014 16:20, Michael Wideniu

Re: [Maria-developers] uint6korr optimization

2014-01-23 Thread Michael Widenius
Hi! > "Alexey" == Alexey Botchkov writes: Alexey> Hi, Monty. Alexey> I've looked at that part of the code, and tried to make the improved Alexey> versions of uint6korr and mi_uint6korr. Alexey> The small program attached that benchmarks these. Alexey> Depending on enabled macros it loops u