Previous 199869 Revisions Next

r36942 Saturday 4th April, 2015 at 23:29:31 UTC by Oliver Stöneberg
optimized attotime with assignment constructor and operator implementations (nw)

gives attotime heavy drivers a nice speedup - e.g. st_de

before: Average speed: 129.29% (19 seconds)
after: Average speed: 151.12% (19 seconds)
[src/emu]attotime.h

trunk/src/emu/attotime.h
r245453r245454
9797      : seconds(secs),
9898         attoseconds(attos) { }
9999
100   attotime(const attotime& that)
101      : seconds(that.seconds),
102         attoseconds(that.attoseconds) { }
103
104   // assignment
105   attotime& operator=(const attotime& that)
106   {
107      this->seconds = that.seconds;
108      this->attoseconds = that.attoseconds;
109      return *this;
110   }
111
100112   // queries
101113   bool is_zero() const { return (seconds == 0 && attoseconds == 0); }
102114   bool is_never() const { return (seconds >= ATTOTIME_MAX_SECONDS); }


Previous 199869 Revisions Next


© 1997-2024 The MAME Team