Replace the revolting build pointer data structure by a proper data
type. Make it abstract because that's possible. Change data layout so that the slots belonging to a sector are together in memory, it's nicer to the cache. (bp): The new type. Users changed. (get_wp): Update accordingly. (alloc_bp): New. (update_main, calc_all): Use it. Before, calc_all() allocated 1/7 more than necessary.
This commit is contained in:
parent
ac9cdf5bb9
commit
5507e8a1dc
13 changed files with 51 additions and 39 deletions
|
@ -257,7 +257,7 @@ decay_fallout(struct sctstr *sp, int etus)
|
|||
* Produce for a specific nation
|
||||
*/
|
||||
void
|
||||
produce_sect(int natnum, int etu, int *bp, long p_sect[][2])
|
||||
produce_sect(int natnum, int etu, struct bp *bp, long p_sect[][2])
|
||||
{
|
||||
struct sctstr *sp;
|
||||
struct natstr *np;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue