sapphiredev / utilities

Common JavaScript utilities for Sapphire Projects
https://www.sapphirejs.dev/
MIT License
153 stars 39 forks source link

perf(snowflake): optimize Snowflake.timestampFrom #792

Closed advaith1 closed 3 weeks ago

advaith1 commented 1 month ago

updates timestampFrom to operate on numbers instead of BigInts. This is faster whether the provided id is a string or bigint, even though sapphire stores the epoch as a bigint, and it is always accurate.

image image