Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tom_mellior
on June 25, 2020
|
parent
|
context
|
favorite
| on:
C performance mystery: delete unused string consta...
I can't think of a plausible way in which an unused global would affect compiler optimizations. Could you elaborate?
HelloNurse
on June 25, 2020
[–]
The pointer probably precedes interesting variables in the same data segment, which therefore shift to a different address that is cached differently.
tom_mellior
on June 25, 2020
|
parent
[–]
Sure, but that's not a compiler optimization issue. The compiler will emit the same instructions, they will just execute at a different speed if the data is elsewhere.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: