Skip to content

Replacing most of absl/time with iree/base:time. - #2572

Merged
benvanik merged 2 commits into
mainfrom
benvanik-time
Jul 20, 2020
Merged

benvanik merged 2 commits into
mainfrom
benvanik-time

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

The new time C++ helpers wrap the C API giving us consistency on both sides of the boundary. We now also only pull in absl/time for a single function and we should be able to cut that in the future. absl/time contributes at least 55KB to a hello-world binary that we should be able to reduce to 0.

Progress on #898.

@benvanik benvanik added runtime Relating to the IREE runtime library performance ⚡ Performance/optimization related work across the compiler and runtime labels Jul 19, 2020
@benvanik benvanik added this to the 2020Q3 Core milestone Jul 19, 2020
@benvanik
benvanik force-pushed the benvanik-time branch 3 times, most recently from d5b9583 to 0657e69 Compare July 19, 2020 01:27
@benvanik
benvanik marked this pull request as ready for review July 19, 2020 01:42
@benvanik
benvanik requested a review from ScottTodd July 19, 2020 01:42
benvanik added 2 commits July 20, 2020 11:37
Still using absl::Now() to get the current time (as it does some magic)
but that will be replaced in the future.
Our only use is now for querying the system time, which if the timezone
stuff isn't stripped after this we can fork.
Comment thread iree/base/time.h
Comment on lines +98 to +100
if (static_cast<iree_time_t>(lhs) == IREE_TIME_INFINITE_FUTURE ||
static_cast<iree_time_t>(rhs) == IREE_TIME_INFINITE_FUTURE) {
return InfiniteDuration();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add unit test coverage for this (and other behavior). Low priority.

@benvanik
benvanik merged commit b63526b into main Jul 20, 2020
@benvanik
benvanik deleted the benvanik-time branch July 20, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance ⚡ Performance/optimization related work across the compiler and runtime runtime Relating to the IREE runtime library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants