1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Smaller and faster sqlite3IsNaN() implementation makes deserialization of

floating point values much faster.

FossilOrigin-Name: ea748edecb261f2b862d542daff6e99a6fd8879a8ace94b440d99e110577d1c1
This commit is contained in:
drh
2019-05-30 00:46:37 +00:00
parent 8a3884efae
commit 05921223c2
5 changed files with 18 additions and 50 deletions

View File

@@ -3802,8 +3802,12 @@ void sqlite3MutexWarnOnContention(sqlite3_mutex*);
#endif
#ifndef SQLITE_OMIT_FLOATING_POINT
# define EXP754 (((u64)0x7ff)<<52)
# define MAN754 ((((u64)1)<<52)-1)
# define IsNaN(X) (((X)&EXP754)==EXP754 && ((X)&MAN754)!=0)
int sqlite3IsNaN(double);
#else
# define IsNaN(X) 0
# define sqlite3IsNaN(X) 0
#endif