5 ms·
also the memory management model in c++ is much more complex - most other languages just use garbage collection to deal with reference lifetimes
by cobalt 5y ago
also the memory management model in c++ is much more complex - most other languages just use garbage collection to deal with reference lifetimes
- PaulDavisThe1st 5y agogarbage collection is one of the abstractions that can interfere with performance. it's out of the question for real time contexts, for example.
- pjmlp 5y agoDepends, https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc https://www.aicas.com/wp/products-services/jamaicavm/ https://www.aicas.com/wp/products-services/jamaicavm/ On the other hand there is real time where even malloc() is forbidden. https://en.m.wikipedia.org/wiki/MISRA_C https://en.m.wikipedia.org/wiki/MISRA_C
- hedora 5y agoThe first one targets “sub-millisecond”, which is a eternity in current systems. According to the third link: > we observed a negative correlation between MISRA rule violations and observed faults So, MISRA isn’t really helping with real time at all. The second link claims pauses are capped at 10us, which (if true) is actually competing with careful use of malloc.
- pjmlp 5y agoHence why I stated "Depends". It is real time enough to drive battleship weapon systems, the kind of apps where the wrong people die when a GC goes wrong. https://www.ptc.com/en/blogs/plm/ptc-perc-virtual-machine-technology-at-the-of-aegis-the-shield-of-the-fleet https://www.ptc.com/en/blogs/plm/ptc-perc-virtual-machine-te...
- PaulDavisThe1st 5y agoThe first link covers cases most simply described as "it needs to be fast, as fast as possible, but things won't go wrong if there's a random 8msec delay". Then there's "things will go wrong if there's a random 8msec delay". Then there's "people will die and/or property will be destroyed if there's a random 8msec delay". I was referring only to the last two. And yes, that means no malloc.
- pjmlp 5y agoDepends how relevant 8msec are on a battleship weapon guidance system, https://www.ptc.com/en/blogs/plm/ptc-perc-virtual-machine-technology-at-the-of-aegis-the-shield-of-the-fleet https://www.ptc.com/en/blogs/plm/ptc-perc-virtual-machine-te... On any case, that is the reason why I started with depends, just like everyone wants to do big data that fits into a USB floppy, there are those cases where CircuitPython would be more than enough, yet people insist in using Assembly. In some cases only Ada/SPARK or MISRA will do, others not, yet all of them might fall under real time and embedded deployment.
- PaulDavisThe1st 5y agoNo, it doesn't depend. That fits clearly into the first category, in which things do not go wrong when there's an 8msec delay. By contrast, using a DAW with typical settings, an 8 msec delay is catastrophic within the scope of the task, even though nobody gets hurt and nothing gets destroyed.
- pjmlp 5y agoI guess we are having a language problem here, because when we have three options to refer to, it is obvious that it depends.