Speed: Python vs. C++ vs. C - Raspberry Pi Forums


is there performance draw backs using python or c++ classes in i/o program? first project pi boss want me use rotary encoder track degrees of rotation. i'm wondering if can use python or c++ because want log info mysql database program , need c++ or python (i assume).


read somewhere if want realy fast control loops have use c. true?

if want fast control loops don't want general purpose non-real-time os linux doing 2 dozen things concurrently.
half-way through rotation it's flush disk cache or someething , miss few ticks.
use separate, dedicated device (arduino dead simple) encode data , send pi.
(i used pi python program smarts behind stepper-motor controller run off arduino, chatted on serial).

"which language"....
python interpreted, it's slower.
of time doesn't matter, ability throw prototype more improtant raw grunt (i.e. developer time more expensive processor time).
c++ can fast c, , can slower if don't know you're doing.
can write bad code in language.


raspberrypi



Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial