feat: add benchmark for datetime to date #4

Merged
Ghost merged 0 commits from refs/pull/4/head into main 2026-01-01 10:42:18 +00:00
Ghost commented 2026-01-01 10:42:11 +00:00 (Migrated from codeberg.org)

Benchmarks some approaches to normalizing a datetime to just a date. (i.e. to truncate the time aspect from a datetime)

Results:

moduloTimestampSideEffect x 20,453,757 ops/sec ±5.25% (83 runs sampled)
moduloTimestampPure x 13,172,454 ops/sec ±1.54% (83 runs sampled)
constructNewDate x 4,538,888 ops/sec ±3.17% (76 runs sampled)
Benchmarks some approaches to normalizing a datetime to just a date. (i.e. to truncate the time aspect from a datetime) Results: ``` moduloTimestampSideEffect x 20,453,757 ops/sec ±5.25% (83 runs sampled) moduloTimestampPure x 13,172,454 ops/sec ±1.54% (83 runs sampled) constructNewDate x 4,538,888 ops/sec ±3.17% (76 runs sampled) ```
Ghost commented 2026-01-01 10:42:18 +00:00 (Migrated from codeberg.org)

mentioned in commit 44cd323ce4

mentioned in commit 44cd323ce4c9dbf2029b66ce07f4c5d2867a9c0f
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SethFalco/nodejs-microbenchmarks!4
No description provided.