News for hackers. Stuff that matters.
Re:A millisecond isn't fast (and how we made it 100x faster) by Jemaclus on Thursday September 10, 2015 @10:52AM (#10198379)
I love this stuff. I'm currently working on a project where, left to my own devices, I would have come up with some complicated scheme that would reduce an O(n) (or even O(n^2)) task to O(log n). Fortunately, the guidelines I've been given (government, of course) offer a series of extremely-hard-to-understand-but-O(1) methods for retrieving the data. I haven't benchmarked it yet, but i'd imagine that my process would take about 5ms per record, and this process will probably take something on the order of 5 microseconds per record.

I'm learning all kinds of tricks that older developers can probably do in their sleep. Very cool.

(Note: the reason I say "older" instead of "experienced", even though for these purposes they're interchangeable, is that the tricks I'm learning are coming from a COBOL codebase written back in the 70s that I'm modernizing into Go.)

I also learned a long time ago that lookup tables for common requests are a no-brainer. If you only have 256 possible answers to a formula, just stick them in a lookup table.

Love it.

Re:A millisecond isn't fast (and how we made it 100x faster) by ihsw on Thursday September 10, 2015 @02:22PM (#10199659)
Migrating COBOL to Go? Government job? Where is this glorious country?
Re:A millisecond isn't fast (and how we made it 100x faster) by molmalo on Thursday September 10, 2015 @03:13PM (#10199950)
I don't want to be the guy rejecting change... But, is someone expecting a project in Go, to last 40+ years as that COBOL codebase lasted?? Wow!
Re:A millisecond isn't fast (and how we made it 100x faster) by chipaca on Thursday September 10, 2015 @05:43PM (#10200740)
It's not because COBOL was good that things written in it lasted; it's because it was there. The things written in it made COBOL last, not vice-versa.