Skip to content

Conversation

finnbear
Copy link

This makes decoding Time in bitcode 6X faster.

It works since bitcode checks the range of integers up front, all at once, using vector instructions, and then uses unreachable_unchecked right before calling Time::from_hms to communicate that fact to rustc. This only works if Time::from_hms is inlinable.

Copy link

codecov bot commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.4%. Comparing base (b6f27d6) to head (31383b3).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #748   +/-   ##
=====================================
  Coverage   92.4%   92.4%           
=====================================
  Files         95      95           
  Lines       9652    9652           
=====================================
  Hits        8922    8922           
  Misses       730     730           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhpratt
Copy link
Member

jhpratt commented Aug 13, 2025

Incidentally I was planning on going through all functions in the coming days and weeks to (re)add #[inline] where appropriate. As such I'll likely end up closing this at that point in time so as to avoid many separate commits for the same thing.

@finnbear
Copy link
Author

Cool, fine with me! I use from_hms_nano anyway. Closing 👌

@finnbear finnbear closed this Aug 13, 2025
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.

2 participants