Ask HN: Largest speedup you ever achieved by only changing a few lines of code?
21–26 of 26 posts
Re: Ask HN: Largest speedup you ever achieved by only changing a few lines of code?
#22Re: Ask HN: Largest speedup you ever achieved by only changing a few lines of code?
#23Not really lines of code as such, but in Visual Foxpro, opening a DBF (database table file) on a fileserver, from an application running on that fileserver, referring to the file using its local path rather than a mapped network drive file path, resulted in a big speedup. (the application typically runs on RDP servers, but can also be run directly on the fileserver, which we do for some heavy-duty processes)
I changed it to generate single page files instead of one large document (we did 14 days of schedule at a time) and it was finishing in less than 6hr.
Lost that job for that one, the boss had coded the system.
Re: Ask HN: Largest speedup you ever achieved by only changing a few lines of code?
#24Re: Ask HN: Largest speedup you ever achieved by only changing a few lines of code?
#25in python. The python script would previously take 4 hours to run. There were lots of small functions and these were called on a loop. I ensured that there were no circular references within any of the functions and then disabled gc (Which is what the gc would look for, variables without circular references would be garbage collected automatically when they go out of scope.)
The script ran in 20 mins.
The hue and cry people raised over the gc.disable though convinced me never to do any unconventional optimizations again.