C translator for calculator project
|
06-09-2019, 09:31 PM
Post: #41
|
|||
|
|||
RE: C translator for calculator project
Quote:The weird thing about the Intel Decimal library is the huge tables repeated verbatim in various source files. Maybe that makes the code slightly faster, but it uses up a lot of precious space on a small, embedded system like a calculator.That's interesting. Are you sure the compiler isn't smart enough to keep just one copy of the table? |
|||
06-09-2019, 10:39 PM
Post: #42
|
|||
|
|||
RE: C translator for calculator project
(06-09-2019 09:31 PM)Druzyek Wrote:Quote:The weird thing about the Intel Decimal library is the huge tables repeated verbatim in various source files. Maybe that makes the code slightly faster, but it uses up a lot of precious space on a small, embedded system like a calculator.That's interesting. Are you sure the compiler isn't smart enough to keep just one copy of the table? Typically, the different C files are compiled individually and then the resulting object files are linked. But in C speak, those tables are declared with internal linkage (declared 'static'), so are invisible to the linker, so you'd end up with multiple copies. Some compilers have "whole program optimization" modes, which might be able to detect they are identical and combine them, in theory. — Ian Abbott |
|||
06-20-2019, 08:29 AM
(This post was last modified: 07-09-2019 12:17 AM by Dan.)
Post: #43
|
|||
|
|||
RE: C translator for calculator project | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)