sapphiredev / utilities

Common JavaScript utilities for your TypeScript projects
https://www.sapphirejs.dev/
MIT License
157 stars 39 forks source link

perf(snowflake): optimize Snowflake.timestampFrom #792

Closed advaith1 closed 2 months ago

advaith1 commented 3 months 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