4 ms·
Is including all that data in the object code really necessary?
by __rkaup__ 15y ago
Is including all that data in the object code really necessary?
- kodablah 15y agoAbsolutely not. This appears to be generated code from a data set to avoid what most developers would do at runtime.
- kelnos 15y agoFrom some of the comments, it's suggested that the problem is too much code, and that the data (of which there is a lot, granted) isn't contributing to the problem. I'm not sure if that's the case though. If the data is part of the problem, I wonder if he can write a new linker script to rearrange the sections in the file so all code is below the signed 32-bit (~2GB) boundary. Though that raises the question... will it be able to address the data? Does initialized data access use 32- or 64-bit offsets in the small/medium models? At any rate, it seems gcc 4.6 supports the x86_64 "large model", which should solve the problem without code/data changes.
- dekayed 15y agoGenerally not. My last project involved building a framework in which scientists could run calculations for certain types of risk. A prototype built by some of said scientists involved code like seen in the SO question. After looking at the types of calculations being done, we figured out that most of the equations that were used were similar and could be generalized. We also moved all the coefficients and parameters for all the equations into configuration files. I suspect that a thorough evaluation of this code would reveal something similar as in my case.