Shop OBEX P1 Docs P2 Docs Learn Events
n-way cache driver — Parallax Forums

n-way cache driver

David BetzDavid Betz Posts: 14,516
edited 2012-08-12 04:14 in Propeller 1
I've done a little experimenting with an n-way set associative cache driver with the following preliminary results. All of these tests were running the solar_spa demo program that comes with SimpleIDE. The total times are probably somewhat slower than would be achieved in a production run because of the instrumentation that I put into the cache driver to determine hit rate and also how evenly the multiple cache ways are utilized.

direct-mapped , 1 way, 128 tags per way, 64 byte cache lines
time 42.91 seconds

two-way, 2 ways, 64 tags per way, 64 byte cache lines
time 31.27 seconds

four-way, 4 ways, 32 tags per way, 64 byte cache lines
time 30.50 seconds

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-08-11 16:10
    That's a nice performance improvement. Thanks for looking at it.

    The solar_spa program is not included in the SimpleIDE package. It's a great work-out though :)
  • Heater.Heater. Posts: 21,230
    edited 2012-08-11 16:38
    Good grief, solar_spar is exactly the kind of program that the Prop is not designed for. It's requires double precision floating point and takes forever to run on a Prop.
  • David BetzDavid Betz Posts: 14,516
    edited 2012-08-11 16:42
    Heater. wrote: »
    Good grief, solar_spar is exactly the kind of program that the Prop is not designed for. It's requires double precision floating point and takes forever to run on a Prop.
    Yes but it thrashes the cache pretty effectively! :-)
    What test would you like to run? The cache code is checked in to Google Code. I'm running on Martin's DNA-RTC board.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-08-12 01:20
    I guess this had to happen - once some clever boffin designs a cache system, another clever boffin makes it faster. Very impressive work.

    Would this work with the SD card cache system - maybe with 512 byte blocks and 16k of hub ram?
  • David BetzDavid Betz Posts: 14,516
    edited 2012-08-12 04:14
    Dr_Acula wrote: »
    I guess this had to happen - once some clever boffin designs a cache system, another clever boffin makes it faster. Very impressive work.

    Would this work with the SD card cache system - maybe with 512 byte blocks and 16k of hub ram?
    Yes, it should be able to work with the SD cache driver although it might not perform well with the restriction of 512 byte cache lines. I'll make it work with most or all of the other cache drivers once I get Roy's new Spin compiler with #include so I can avoid duplicating code across every driver.
Sign In or Register to comment.