diff options
author | couriersud <couriersud@gmx.org> | 2017-04-06 00:03:59 +0200 |
---|---|---|
committer | couriersud <couriersud@gmx.org> | 2017-04-09 00:04:10 +0200 |
commit | 49d50c3045a71a75566ad4322bf2195b2adba0c2 (patch) | |
tree | ee1e5f74c8f4fbf04d896d6703e7a4c43bbc8f31 /src/lib/netlist/solver/nld_ms_w.h | |
parent | 3f9f4eedcfc2757567d8bc46bd8e6f7850348683 (diff) |
Netlist code refactoring:
- more use of c++ features
- some CRTP in pfmtlog
- demangled code for truthtables
- use more constexpr
- rewrite main loop
- use default constructors and assignment operators were applicable.
- optimized 7448 and 9316
All of this has decreased startup time by approx. 25% to 30%. Complex
netlists like pong or kidniki are parsed, analyzed and constructed in
around 15 ms. Run performance has increased by about 5%.
All in all not to bad. A game like pong uses a clock of 7 MHz (after
division by 2). Thats 14 MHz clock invocations. Running at over 200%, 28
MHz. On a 3.9 GHz Machine about 140 cycles/clock change.
[Couriersud]
Diffstat (limited to 'src/lib/netlist/solver/nld_ms_w.h')
-rw-r--r-- | src/lib/netlist/solver/nld_ms_w.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/netlist/solver/nld_ms_w.h b/src/lib/netlist/solver/nld_ms_w.h index 3e6c7a1fe17..ed110c01c7b 100644 --- a/src/lib/netlist/solver/nld_ms_w.h +++ b/src/lib/netlist/solver/nld_ms_w.h @@ -97,7 +97,7 @@ protected: nl_double m_last_RHS[storage_N]; // right hand side - contains currents private: - static const std::size_t m_pitch = ((( storage_N) + 7) / 8) * 8; + static constexpr std::size_t m_pitch = ((( storage_N) + 7) / 8) * 8; nl_ext_double m_A[storage_N][m_pitch]; nl_ext_double m_Ainv[storage_N][m_pitch]; nl_ext_double m_W[storage_N][m_pitch]; |