At 11:27 29/03/2007, you wrote:
>Hello:
>
>  I'm trying to use altivec simd code to SQLite. Has read hash.c but it looks 
> like hashing is done one by one when insert data. Is it true? When is called 
> rehash function? If i insert data with index i think hashing happens one by 
> one, but if i insert all data and after that make an index rehash works. Can 
> anyone confirm this? Rehash function is the only one i can convert to altivec 
> (with it's own hashing functions).
>
>Thanks 

Ok, i was wrong, it can be done but needs a rework from other files too. The 
"void *sqlite3HashInsert(Hash *pH, const void *pKey, int nKey, void *data)" 
function must be changed for get 4 pKey,nKey pairs and an int to say if they 
are 4, 3, 2 or 1 keys or a special pKey,nKey pair with "no-op" meaning.

The best way i think is to make a *sqlite3HashInsertSimd or similar that checks 
which simd (altivec, mmx, sse or similar) works at startup or compile time and 
the function caller/user of sqlite3HashInsert decides based on the amount of 
data to hash if uses the simd or the normal function. I expect a x4 to x7 speed 
increment using altivec. Don't know for other simd architectures. 





-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to