diff options
| author | 2020-06-13 15:49:35 +0200 | |
|---|---|---|
| committer | 2020-06-13 15:49:35 +0200 | |
| commit | e949e9c29de82ee7c32692e7b65da05dd22bdc9d (patch) | |
| tree | 8770696a48827e3b63d94063f8162eaadeff6539 /src/devices/machine/netlist.cpp | |
| parent | 75681d760c478f772fdb1603222498f96a9b61e7 (diff) | |
netlist: Performance improvement and refactoring. [Couriersud]
Kidniki now achieves up to 910% when run with static solvers and with
nltool. That is significant better than the 860% we have seen
previously.
This increase is driven by using a global memory pool in the solver
code.
In addition the following refactoring and code maintenance work is
included. Please excuse the large commit, some of this took interfered
with other work and the detail development steps were ugly.
- gsl support: This commit adds pgsl.h which implements a very limited
number of the functionality of the gsl header described in the c++ core
guidelines.
- clang-tidy fixes
- A significant refactoring of palloc.h. Aligned hints were removed,
they added complexity without a significant performance gain. Vector
operations should better be done on special spans/views.
The code has been tested on linux with g++-7, g++-9, clang-11.
On Windows mingw-10 and VS2019, OSX clang-11.
Diffstat (limited to 'src/devices/machine/netlist.cpp')
| -rw-r--r-- | src/devices/machine/netlist.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index a47d453762d..1dd17acd8b1 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -127,7 +127,7 @@ protected: netlist::host_arena::unique_ptr<plib::dynlib_base> static_solver_lib() const noexcept override { //return plib::make_unique<plib::dynlib_static>(nullptr); - return netlist::host_arena::make_unique<plib::dynlib_static>(nl_static_solver_syms); + return plib::make_unique<plib::dynlib_static, netlist::host_arena>(nl_static_solver_syms); } private: @@ -169,7 +169,7 @@ protected: netlist::host_arena::unique_ptr<plib::dynlib_base> static_solver_lib() const noexcept override { - return netlist::host_arena::make_unique<plib::dynlib_static>(nullptr); + return plib::make_unique<plib::dynlib_static, netlist::host_arena>(nullptr); } private: @@ -181,7 +181,7 @@ class netlist_mame_device::netlist_mame_t : public netlist::netlist_state_t public: netlist_mame_t(netlist_mame_device &parent, const pstring &name) - : netlist::netlist_state_t(name, netlist::host_arena::make_unique<netlist_mame_device::netlist_mame_callbacks_t>(parent)) + : netlist::netlist_state_t(name, plib::make_unique<netlist_mame_device::netlist_mame_callbacks_t, netlist::host_arena>(parent)) , m_parent(parent) { } @@ -978,7 +978,8 @@ netlist::host_arena::unique_ptr<netlist::netlist_state_t> netlist_mame_device::b { try { - auto lnetlist = netlist::host_arena::make_unique<netlist::netlist_state_t>("netlist", netlist::host_arena::make_unique<netlist_validate_callbacks_t>()); + auto lnetlist = plib::make_unique<netlist::netlist_state_t, netlist::host_arena>("netlist", + plib::make_unique<netlist_validate_callbacks_t, netlist::host_arena>()); // enable validation mode lnetlist->set_extended_validation(true); common_dev_start(lnetlist.get()); |
