Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc.
|
02-29-2020, 05:00 PM
Post: #1
|
|||
|
|||
Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc.
By making use of the automatic Ans variable, and playing a bit fast and loose with the parser, it's possible to squeeze a bit more speed out of the n-queens program for the fx-4000P, and presumably most (all?) of the models that use the same benchmark program.
Modified version: Code: Mcl By omitting the store into variable T, and instead letting A[X]-A[Y (omission of the final bracket is deliberate) automatically store in Ans, the execution time on my fx-4000P dropped from 00:05:57 to 00:05:41 (+/- 1 sec. margin of error on measurements). So, roughly a 4.5% reduction in execution time. Note that you can't leave out the closing bracket for array references that are the target of a store or Dsz/Isz, so R->A[X] and Dsz A[X] can't benefit from this optimization. Now somebody needs to go re-test the FX-6000G, FX-6300G, FX-6500G, FX-7000G, FX-7000GA, FX-7000GB, FX-7200G... |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc. - Dave Britten - 02-29-2020 05:00 PM
RE: Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc. - Dave Britten - 03-01-2020, 01:22 PM
RE: Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc. - xerxes - 03-01-2020, 07:48 PM
|
User(s) browsing this thread: 1 Guest(s)