dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
515 stars 97 forks source link

perf: use less cycles in `@timer_helper` #4777

Closed ggreif closed 3 days ago

ggreif commented 3 days ago

Since the observation of a null in the expiration array means there will be no more found, it is pointless to stay in the loop. I expect 1 expiration per callback in the frequent case.

github-actions[bot] commented 3 days ago

Comparing from cc1eac1c6ff22e7036d8a6e3534dbe74450998a8 to a9233c04016108dabd85457b98443fe187b4f4ad: In terms of gas, no changes are observed in 5 tests. In terms of size, no changes are observed in 5 tests.