Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a cool post. Initially I was discouraged by the list of things needed to properly diagnose it, but that doesn't seem unreasonable:

Java Flight Recorder

perf-map-agent

PerfSpect (Performance Monitoring Counters (PMCs)

Intel vTune

As folks keep looking to Rust for safety and performance, I wonder what in-language facilities exist to say "this variable should exist in a separate cpu cache line". That would be neat level of control in contrast to recognizing this in debugging + adding arbitrary padding.



That's not the something that can be applied through compile-time analysis nor it is something that the language can "solve". There is actually nothing to be solved unless you have an actual workload which justifies making a change like this.

As a matter of fact, applying such pattern blindly would have a negative effect on an increased memory pressure. You're increasing your application runtime memory footprint by doing this.


I meant in the context that you knew ahead of time this would cause a cache coherency issue. I agree you're almost always finding this after the fact. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: