Hi,
I'm measuring the miss penalty of swapping 4 bytes, 16 bytes, 64 bytes, 256 bytes, 1024 bytes and 8192 bytes on ruby. I have a code which simply swaps these bytes to measure the ruby cycles taken when this data is not in ruby cache. With 4 bytes, the cycles/(user misses) is 347 cycles which is close to my memory latency (300 cycles). With 16 bytes , this goes upto 392 cycles. With 256 bytes, this goes upto 677 cycles and with 8192 bytes , this is 1200 cycles. I'm unable to reason about the penalty increasing as I increase the number of bytes to swap. My expectation is that it should remain around 350 cycles . . . any thoughts ?
Lyon
|