1
0
mirror of https://github.com/prirun/p50em.git synced 2026-04-15 23:51:06 +00:00

em.c, etc: use gv.xxx instead of gvp->xxx for 13% speed increase, from

37.5 Prime MIPS on Linode VM to 42.5 MIPS.  gvp-> was faster on the
PowerPC architecture when gvp was kept in a dedicated register, but
that does not apply to Intel.

Old:

Timing CPU,  20.0 ticks per second...
  35.3 Prime MIPS for 16-bit ADD loop
  40.0 Prime MIPS for 16-bit MPY loop
  42.1 Prime MIPS for 16-bit DIV loop
  21.4 Prime MIPS for 32-bit ADD loop
  30.8 Prime MIPS for 32-bit MPY loop
  28.6 Prime MIPS for 32-bit DIV loop
  57.1 Prime MIPS for 16-bit X=0 loop
  44.4 Prime MIPS for 32-bit X=0 loop
  37.5 average Prime MIPS

New:

Timing CPU,  20.0 ticks per second...
  42.9 Prime MIPS for 16-bit ADD loop
  53.3 Prime MIPS for 16-bit MPY loop
  47.1 Prime MIPS for 16-bit DIV loop
  24.0 Prime MIPS for 32-bit ADD loop
  38.1 Prime MIPS for 32-bit MPY loop
  32.0 Prime MIPS for 32-bit DIV loop
  57.1 Prime MIPS for 16-bit X=0 loop
  44.4 Prime MIPS for 32-bit X=0 loop
  42.4 average Prime MIPS
This commit is contained in:
Jim
2020-03-08 23:46:14 -04:00
parent 35adf0905a
commit 9054d69446
6 changed files with 330 additions and 333 deletions

View File

@@ -166,8 +166,8 @@ AMLC status word (from AMLCT5):
/* macro to setup the next AMLC poll */
#define AMLC_SET_POLL \
if (devpoll[device] == 0 || devpoll[device] > AMLCPOLL*gvp->instpermsec/pollspeedup) \
devpoll[device] = AMLCPOLL*gvp->instpermsec/pollspeedup; /* setup another poll */
if (devpoll[device] == 0 || devpoll[device] > AMLCPOLL*gv.instpermsec/pollspeedup) \
devpoll[device] = AMLCPOLL*gv.instpermsec/pollspeedup; /* setup another poll */
int devamlc (int class, int func, int device) {
@@ -1296,8 +1296,8 @@ dorecv:
if (class == 4) /* this was a poll */
wascti = 1;
if (dc[dx].intenable && (wascti || neweor)) {
if (gvp->intvec == -1) {
gvp->intvec = dc[dx].intvector;
if (gv.intvec == -1) {
gv.intvec = dc[dx].intvector;
dc[dx].interrupting = 1;
} else
devpoll[device] = 100; /* come back soon! */