Jan. 9th, 2003

Rock On

Jan. 9th, 2003 11:59 pm
ralphmelton: (Default)
Today was an extremely good day at work.

Monday night, I'd had a brilliant (if I do say so myself) idea on how to solve a problem that's been vexing us for quite some time.

Tuesday and Wednesday, we talked about my ideas and came up with some alternatives. We liked my idea, but we were worried about the time required to build a certain data structure.

So today, Mike and I experimented to see whether my idea was viable:
We slammed out an implementation of the data structure. (Using an STL multimap was extremely handy; we were able to write the whole structure in less than two pages of code. But we worried that it might not be optimally efficient.)
In thinking about what we needed to do to build this structure, I realized that we had another algorithm class lying around that could be adapted to serve our needs, despite the fact that this task was fairly foreign to its original purpose. We managed to make it serve our purpose by overriding only one virtual method. (We cut a few corners here, and we didn't bother to use one complex optimization that might have given us better paging behavior.)
By then, it was 6:00, and we'd reached a good stopping place. But Mike pointed out that to do the timings we needed, we didn't have to write any code to integrate our new data structure; we could just write a simple driver program. So we slammed that out. We even managed to write the driver program with only one syntax error.

And then we timed it: with a cold cache, it adds 0.4 seconds to the time to load a very small database, 1.0 seconds to the time to load a medium-small database, and 70 seconds to the time to load a large database--and that's with debug code. This is very viable.

I just *love* days like this, when we can pull off amazing stuff because my mastery of the toolkit is so total that it will turn somersaults for me. I love being this good.

(Let me not be too vain: I would not have finished this so quickly were it not for Mike's knowledge of the STL and his great bug-spotting. We work together far better than I would work alone.)

Profile

ralphmelton: (Default)
ralphmelton

April 2018

S M T W T F S
1234567
891011121314
151617181920 21
22232425262728
2930     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 25th, 2026 01:03 pm
Powered by Dreamwidth Studios