Version 2.1.8
Added fine-grained garbage collection callbacks to the API.
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@4238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/conversions.h b/src/conversions.h
index bdc7e44..4aaf0c0 100644
--- a/src/conversions.h
+++ b/src/conversions.h
@@ -36,7 +36,12 @@
// rounding towards zero.
// The result is unspecified if x is infinite or NaN, or if the rounded
// integer value is outside the range of type int.
-static inline int FastD2I(double x);
+static inline int FastD2I(double x) {
+ // The static_cast convertion from double to int used to be slow, but
+ // as new benchmarks show, now it is much faster than lrint().
+ return static_cast<int>(x);
+}
+
static inline unsigned int FastD2UI(double x);