google / benchmark

A microbenchmark support library
Apache License 2.0
8.69k stars 1.59k forks source link

Simplify CycleClock a bit by reducing duplication #1578

Closed brad0 closed 1 year ago

brad0 commented 1 year ago

There are three copies of the same chunk of code for different processors. Simplify things by having one copy for the various processors and place it at the bottom.

HFTrader commented 1 year ago

I feel like the leaving of each platform in its own bucket was on purpose. if you have an issue and look into that file it is immediately clear what is going on. Playing devil's advocate, it is a lot of risk for little gain. I would say there is a loss: the comments for mips were now together with the other platforms. And there is no gain either in performance or compile time. (Apologies I am not even an approver)

dmah42 commented 1 year ago

yes, this was deliberate. it allows platforms to migrate to alternatives without significant refactoring.

i'm going to close this. i appreciate it isn't obvious why this was deliberate and your cleanup attempt is still very much appreciated.