Link Details

Link 106837 thumbnail
User 252611 avatar

By Thierry.Lefort
via codeproject.com
Published: Aug 26 2008 / 08:01

64 bit is wonderful - no longer we are limited to a just 2GB (per Win32 process) - you can now address a full 8TB of memory (per Win64 process)... which is great if your application really needs 8TB of memory. If you don't need the full address space, 64-bit can be wasteful: pointers take twice the memory, which may actually result in a slower application, especially when using pointer-laden data structure such as a binary tree (larger structures take more cache space). A simple scheme is presented that allows using 32-bit "pointers" to access up to 64GB of memory on a 64-bit machine
  • 7
  • 0
  • 826
  • 227

Comments

Add your comment
User 200606 avatar

cossins replied ago:

1 votes Vote down Vote up Reply

I fail to see the use for this?
I mean, everybody loves pointer fun, but this is just not useful.

The "slowdown" from dealing with 64-bit pointers instead of 32-bit pointers is negligible, if it exists at all (benchmarks have more or less consistently shown speedups when using 64-bit instead of 32-bit applications on the same CPU, but it depends on the OS), and the overhead from actually converting between the two every time you need to dereference a pointer is ridiculously high in comparison.

It may be that pointers take twice the memory, but 4 bytes is a TINY amount in modern computers.

All in all: Interesting experiment, but totally at utterly useless in reality. The reason for doing this should NOT be performance, rather than amusement.

- Simon
,

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (7)



Voters Against This Link (0)