On Fri, Jun 16, 2017 at 12:18:31PM -0700, Zach Morris wrote: > In short, my "optimized" Python code seems to run faster in testing, but > overflow more in practice. Could you help me understand why this happens?
This looks like a classical example of 'fast and efficient' not being the same as 'real-time-safe'. Assume you have some routine that is called every T seconds, and it must complete its work and return before the next call is due or the caller gets into problems. Then it is not sufficient that on average the routine is fast enough - its *worst case* running time must be less than T. And that is something that Python just can't guarantee. No matter how fast your code is, any single call could take much more than the average time, for example when Python calls its garbage collection routines which it can do at any time. The classical solution for this is buffering. Ciao, -- FA A world of exhaustive, reliable metadata would be an utopia. It's also a pipe-dream, founded on self-delusion, nerd hubris and hysterically inflated market opportunities. (Cory Doctorow) _______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
