News for hackers. Stuff that matters.
Re:Drop millions of allocations by using a linked list (2015) by jedimastert on Friday March 12, 2021 @10:55AM (#26437095)
I remember seeing a sizable astrophysics Fortran program from many decades prior that had one "MEMORY" array declared at the beginning of the program and legit used it for every single byte of memory for the entire program. It was nuts
Re:Drop millions of allocations by using a linked list (2015) by vecter on Friday March 12, 2021 @10:57AM (#26437124)
The same goes for the AMBER computational chemistry FORTRAN program. The array is called X.
Re:Drop millions of allocations by using a linked list (2015) by jedimastert on Friday March 12, 2021 @12:22PM (#26438194)
Actually, that might be what I'm thinking of. For some strange reason (this was in 2013, mind you) I was involved with translating legacy Fortran projects for multiple departments.
Re:Drop millions of allocations by using a linked list (2015) by svat on Friday March 12, 2021 @07:06PM (#26442502)
This is also how the TeX program works. Of course it has lots of variables (hundreds of "global" variables in fact), but for everything whose size may vary (boxes, lists of characters, lists of tokens for macros, …), it has two giant arrays of fixed size, one called “str” (aka the string pool, used for strings), and one called “mem” (used for everything else). It's this way partly because of the limitations of Pascal at the time.
Re:Drop millions of allocations by using a linked list (2015) by queuebert on Friday March 12, 2021 @12:28PM (#26438262)
TEKTON, a crater modeling code, had this, but I think it called the array 'a'.