langer/Your-Sticky-Header-Is-Obnoxious-Breaks-My-Page-Down-Button-And-Wastes-20-Of-My-Viewport — pull request #2 by crowjonah (2014-10-02 19:10:19+00:00)
Title: remove jQuery dependency, throttle scroll events to prevent jank

This should improve performance a bit, and still does pretty much the same thing you were doing, with the exception that instead of blasting away the offending elements, I just hide them, and re-show them if you scroll all the way to the top of the page!