Review Board 2.0.15


sim: Pre-compute the clock period

Review Request #1885 - Created May 27, 2013 and discarded

Information
Andreas Hansson
gem5
default
Reviewers
Default
Changeset 9761:a04648a0d2c6
---------------------------
sim: Pre-compute the clock period

This patch changes the source and derived clock domain such that no
virtual functions or multiplications are needed when calling
clockPeriod. Instead, the clock period is pre-computed when any
changes occur. For this to be possible, a clock domain must be aware
of its children and the corresponding data structures and methods have
been added to facilitate this.
All regressions pass
Review request changed
Updated (June 14, 2013, 12:42 a.m.)

Status: Discarded

Ship it!
Posted (June 15, 2013, 10:06 p.m.)
Out of curiosity, was this any faster, or did you really just do it because I thought it was crazy.  While I feel better about the code working this way, you indicated that there wasn't much of a performance impact.  I hope you didn't do this because I objected.  I really do feel that a performance measurement is worth more than gut reaction.  (Perhaps you didn't do your performance test using something that stressed the clock and didn't want to?)
  1. I ran the regressions multiple time and it did have an impact in the end. After compensating for fluctuations, it was probably in the order of ~5% of the regressions time, so closer to ~10% for the clock intensive runs. In short, your gut feeling was pretty spot on :-)