bitemyapp / bitemyapp/blacktip
Making getting the current time faster
- Dominant language
- Haskell
- Stars
- 40
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
This sucks:
https://github.com/bitemyapp/blacktip/blob/master/src/Database/Blacktip.hs#L45
Worse, it sucks in multiple ways.
First:
`(round . (*1000))`
`round` is slow-as. The `(*1000)` ideally wouldn't even be necessary.
Second:
`PSX.getPOSIXTime` originates in a syscall and goes through like 3 redundant transformations before I get anything out of it. This is slow and unnecessary! Ideally we'd want a millisecond-resolution with the same 64-bit representation in as little work as is possible.
Worth noting that getPOSIXTime doesn't guarantee monotonicity. I don't know how likely of a problem that is.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.