[tz] [PROPOSED] Simplify zdump average-taking

Philip Paeps philip at trouble.is
Thu Dec 1 02:25:58 UTC 2022


On 2022-12-01 10:06:18 (+0800), John Hawkinson via tz wrote:
> I don't mean to single out this diff, but: why are we making changes 
> like this?
> I cannot imagine that the width of a single instruction in zdump (of 
> all things!) matters to...literally anyone?

I'm generally in favour of constant (thoughtful) refactoring and keeping 
up with developments in standardisation.  It keeps eyeballs on the code. 
  I'm sure there are several of us on tz@ who at least glance over every 
diff.  (Or at least a few.  More than one.)

Having said that, I would feel more comfortable with the more arcane 
changes and apparent micro-optimisations if we had automated regression 
testing in place.

> [ If someone has an embedded system that spends its time flat-out 
> running zdump to control an elevator or something, I want to hear 
> about it! ]

[ Shhhh!  Even thinking thoughts like this can cause such devices to 
spring into existence, and then someone will eventually have to fix 
them. :-) ]

> And the risk of these fixes introducing subtle errors or not being 
> carefully reviewed seems far higher than the benefit?

I'm more worried about the changes not seeing wider testing before 
ending up in releases.

> I think I am missing something but could someone explain the 
> perspective of why these kinds of changes should be made?

I can't speak for Paul but this specific change looks primarily like a 
simplification.  The fact that it improves performance is a happy 
coincidence.

Philip

-- 
Philip Paeps
Senior Reality Engineer
Alternative Enterprises


More information about the tz mailing list