Re: [PATCH v5] rtc: Improve performance of rtc_time64_to_tm(). Add tests.

From: Alexandre Belloni
Date: Mon Aug 09 2021 - 18:10:04 EST


On Thu, 24 Jun 2021 21:13:43 +0100, Cassio Neri wrote:
> The current implementation of rtc_time64_to_tm() contains unnecessary
> loops, branches and look-up tables. The new one uses an arithmetic-based
> algorithm appeared in [1] and is approximately 4.3 times faster (YMMV).
>
> The drawback is that the new code isn't intuitive and contains many 'magic
> numbers' (not unusual for this type of algorithm). However, [1] justifies
> all those numbers and, given this function's history, the code is unlikely
> to need much maintenance, if any at all.
>
> [...]

Applied, thanks!

[1/1] rtc: Improve performance of rtc_time64_to_tm(). Add tests.
commit: 1d1bb12a8b1805ddeef9793ebeb920179fb0fa38

Best regards,
--
Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>