News for hackers. Stuff that matters.
Re:Three Optimization Tips for C++ by protopete on Wednesday May 07, 2014 @05:30PM (#7712764)
Pointers don't have to be the exception. I'm working on a programming language runtime where objects are stored as a 32-bit value, with 3/4 of the range representing an integer, and 1/4 of the range (30 bits) representing a pointer. Given the constraint that pointer objects are aligned to 8 bytes, the 30-bits multiplied by 8 results in an 8GB addressable memory space. Pages within that space can be allocated using mmap with MAP_FIXED flag. Smaller memory usage results in more things in cache, resulting in higher performance.
Re:Three Optimization Tips for C++ by TorKlingberg on Wednesday May 07, 2014 @06:09PM (#7712909)
So, your pointers will not be able to address bytes individually? No char pointers, or is it 8 byte chars? Or is this a completely different language without raw pointers?
Re:Three Optimization Tips for C++ by protopete on Wednesday May 07, 2014 @06:47PM (#7713053)
The language is currently without raw pointers, suitable for an object system like Python/Ruby/JS.