]> git.kaiwu.me - njs.git/commit
Optimized conversion of negative numbers to integer.
authorValentin Bartenev <vbart@nginx.com>
Sat, 19 Nov 2016 19:20:06 +0000 (22:20 +0300)
committerValentin Bartenev <vbart@nginx.com>
Sat, 19 Nov 2016 19:20:06 +0000 (22:20 +0300)
commit1696d6b801bb3861c6480148f9d6551c712c3828
tree406c08dae5a397ce994e6eae6612ef51cdf37c02
parent06591a3a7f05526db3e14e6698c2fd4611176179
Optimized conversion of negative numbers to integer.

There is no reason to use fmod() for all negative numbers.
The numbers in range [-2^53, 2^53] can be converted directly
to int64_t.
njs/njs_number.c