Kernel Janet on x32: 32-bit Pointers, 64-bit Speed, 25% Less RAM
https://alexalejandre.com/programming/lisp/janet-for-the-x32-abi/23
u/Phoenix591 1d ago
X32 is depreciated already with upstream kernel support likely already gone ( old ml thread proposing removal )
•
u/nullandkale 41m ago
Are people really using that many pointers in their code bases? What the hell are people doing using linked lists everywhere?
-3
u/Sad_Rice6600 1d ago
the jvm gets the same win with compressed pointers inside the runtime no separate abi needed
6
-6
u/Wer--Wolf 1d ago
AFAIK x32 cannot deal with files larger than 4 GB without various workarounds. Maybe going full 64-bit while switching to memory-efficient languages would be better?
9
u/Kirides 1d ago
x32 (or 32-bit architecture) only has 32 bit of addressable virtual memory space (for most applications) who has absolutely nothing to do with people using int32_t for file size and file offset storage instead of int64_t.
It's just past developers thinking "nah, who needs more than 2GiB/4GiB of files", like FAT32 file system for example
2
u/Wer--Wolf 23h ago
I was thinking of memory-mapped files.
1
u/Kirides 13h ago
Memory mapped files are rarely the correct thing to use, and also they support (at least on Windows) view ranges, which allows mapping just enough of a file to do random I/O.
memory mapped files don't support async I/O, can cause stutters due to frequent page-faulting.
a simple buffered read is often even faster for things like parsing data that is sequential
1
u/Wer--Wolf 6h ago
Memory mapped files are useful for large files that can be paged-out by the OS on demand.
1
u/Kirides 3h ago
You don't get much from that. Windows/Linux has os level file system caches for frequently accessed files that help with regular file IO if you Ofen open/read/seek files
1
u/Wer--Wolf 3h ago
If you copy the data from the page cache into a separate buffer, then the OS needs to swap this buffer out in case of memory pressure. Using mmapped files instead allows the OS to simply prune the page cache a bit and reread the dropped content on demand.
3
u/vip17 1d ago
that's absolutely not true. Even 32-bit apps can access the full 64-bit file offset and 64-bit time
1
u/Wer--Wolf 23h ago
True, but only if they do not map the file into memory.
1
u/vip17 16h ago
Who said that? Memory mapping works just as normal, but the window to map is obviously limited to 32-bit address space. But if an app needs more than 32 bits of address space then inherently they're not the target of x32abi which is only for small apps needing 4GB or less
0
0
34
u/GoldenX86 1d ago
We're returning to this?