Hey.

Currently createCollation() function in main.c is structured like this:

1. functions starts and immediately computes int nName = sqlite3Strlen30(zName);
2. then there's a ton oh checks some of those checks lead to early return
3. then there's if( (pColl->enc & ~SQLITE_UTF16_ALIGNED)==enc2 ) check and 
inside that "if" is the only use of "nName" value.

zName could not have been changed between computation of `nName` and use of 
`nName` so`nName` could just as well be computed right before use, not at the 
beginning of the function and that would save a couple of processor cycles in 
cases where control doesn't pass into that "if" body.

Best wishes.
Dmitry.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to