[vox-tech] benchmarking (again)
Mark K. Kim
lugod at cbreak.org
Fri Feb 17 12:00:49 PST 2006
On Fri, Feb 17, 2006 at 11:13:42AM -0500, Peter Jay Salzman wrote:
> And I've read that java allocates
> memory for all data items on the heap, which is never stored in L1 cache
> while for C and C++, temporary objects are often put into the L1 cache.
I think you mean CPU registers? L1/L2/L3 caches are just buffers
between RAM and the CPU registers, and all data allocated in RAM, stack
or heap, go through L1 cache at some point. Programming languages or
compilers have no direct memory allocation access of the caches.
Anyway, wouldn't the details of data items getting allocated in the
heap/stack/register depend on the JVM and the JIT compiler? Objects,
would have to be allocated in the heap, but simple data types like
"double" can certainly be temporarily allocated in a CPU register until
it's out of scope, no matter what the Java standard may say, if the JIT
compiler, for example, determines it can be done safely and can speed up
the execution.
-Mark
--
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Cyworld: http://www.cyworld.com/markuskimius
Friendster: http://www.friendster.com/user.php?uid=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E 5167 6822 94F0 F298 5DCE
PGP key available on the homepage
More information about the vox-tech
mailing list