From 1d141e4063be8e80f1b6507b3b55e164450573ad Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 8 Dec 2021 18:44:46 -0500 Subject: [PATCH] point key generation ~10% faster --- src/geo/point.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/geo/point.js b/src/geo/point.js index b8241524..ac21c6c7 100644 --- a/src/geo/point.js +++ b/src/geo/point.js @@ -27,10 +27,10 @@ return this._key; } return this._key = [ - this.x.round(6), - this.y.round(6), - this.z.round(6) - ].toString(); + ((this.x * 100000) | 0), + ((this.y * 100000) | 0), + ((this.z * 100000) | 0) + ].join(''); } }