Skip to content

Conversation

@reallesee
Copy link

@reallesee reallesee commented Jul 23, 2025

…ations

Why is this change needed?

Replace string conversion and parsing with more efficient bitwise right shift operation in extractEventTimestamp function. This change improves performance by eliminating unnecessary string operations while maintaining the exact same functionality

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review


PR-Codex overview

This PR refactors the extractEventTimestamp function in time.ts to improve efficiency by replacing the conversion of eventId to a binary string and slicing it with a bitwise right shift operation.

Detailed summary

  • Changed the implementation of extractEventTimestamp.
  • Replaced the conversion of eventId to a binary string with a bitwise right shift (eventId >> SEQUENCE_BITS).
  • Removed the intermediate variable binaryEventId and binaryTimestamp.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Jul 23, 2025

⚠️ No Changeset found

Latest commit: ccc0ab1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant