https://www.folklore.org/StoryView.py?story=Negative_2000_Li... : “He […] had completely rewritten the region engine using a simpler, more general algorithm which, after some tweaking, made region operations almost six times faster. As a by-product, the rewrite also saved around 2,000 lines of code. He was just putting the finishing touches on the optimization when it was time to fill out the management form for the…
So I went through the main pages and rewrote much of the logic as single SQL queries, admittedly rather complex ones, reorganized the code and broke it out into functional modules. The resulting code was about 1/3 of the size of the original.
About a month into the task, I got dragged into management where a very confused project manager asked me why my LOC was negative. I told them "Because I actually know what I am doing". The guy seemed unconvinced until I showed them the original code and mine, and the benchmarks of the two. So I ended up the only guy in a team of 30 coders excempt from their idiotic LOC rules.
And then a month later the 2007 stock market crash happened and that company almost immediately curled its toes and died. Possibly for the best.