"be consistent" | |
PerlMonks |
Re^5: Perl vs Python revisitedby GrandFather (Saint) |
on Jan 16, 2017 at 01:05 UTC ( [id://1179619]=note: print w/replies, xml ) | Need Help?? |
The code was somewhat faked up because I didn't have access to the details and they don't actually matter much anyway. The code is actually in a multiple channel sampling system used for biological signals. It does sample 24 bits (at around 40 kHz), but most of the signal processing is 32 bits and the final output is 16 bits (at around 120 kHz)! But to satisfy curiosity somewhat the code is currently:
The 9 is a decimation ratio. I can't remember what the 5 is (maybe an interpolation ratio?), and the 2 * PI is a fudge factor we determined by in essence profiling the code (with a logic analyser actually). There was extensive discussion around the buffer sizes, but at a higher "philosophical" level that didn't really touch on the magic numbers. Oh and look, here's the original code:
Note the rather worrying disconnect between 4 in the comment and the actual constant value of 2! The whole exercise was not a shining example of a team pulling together, but the situation was complicated by factors beyond our control.
Premature optimization is the root of all job security
In Section
Meditations
|
|