Cache Question
From: Bryan Parkoff (bryan.nospam.parkoff_at_nospam.com)
Date: 03/29/04
- Next message: hutch--: "Re: Same Performance for Both Routines???"
- Previous message: Matt Taylor: "Re: Absolute jump without register?"
- Next in thread: Matt Taylor: "Re: Cache Question"
- Reply: Matt Taylor: "Re: Cache Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Mar 2004 03:01:08 +0000 (UTC)
I understand that Cache L1 can only limit 8KB or 16KB. Is it really
8192 bytes or 16384 bytes? It looks like 64 bytes times 128 lines that it
equals to 8192 bytes. Does it mean that the length of instruction and index
/ displacement?
For example:
MOV [mem1],200 ; 10 bytes
MOV [mem2],200 ; 10 bytes
MOV [mem3],201 ; 10 bytes
MOV EAX,100 ; 5 bytes
MOV EBX,150 ; 5 bytes
Total: 40 bytes.
Forty bytes can fit in Cache L1 that is 8KB. Twenty-four bytes are
unused, but they must be replaced to NOP. Forty bytes plus 24 NOPs are in
first line. Next more instructions with 64 byte count will be in second
line. Between first and second line are not cross boundary.
If instructions have total 65 bytes, it won't fit in first line so it
has to fit in both first and second line that it can cause cross boundary
before it will have cache miss.
Is it correct?
What is difference between Cache L1 and L2?
-- Bryan Parkoff
- Next message: hutch--: "Re: Same Performance for Both Routines???"
- Previous message: Matt Taylor: "Re: Absolute jump without register?"
- Next in thread: Matt Taylor: "Re: Cache Question"
- Reply: Matt Taylor: "Re: Cache Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|