FORTH UPLOAD SPEED¶
How it Works¶
Forth projects are normally (but not always) developed by serially uploading source code to a Microprocessor, usually to a UART peripheral in the MCU from a PC where the source was developed in an $EDITOR.
A C developer develops the C source on a PC, then compiles it on the same PC before flashing it to the MCU via JTAG or SWD. The developer then tests, debugs, recodes, recompiles reflashes etc.
Forth is different to C because the target MCU does the compiling, not a PC. The PC only creates the SOURCE code with an $EDITOR, the MCU does the rest.
Speed¶
All the above take time and this time is a regular part of the repetitive development process.
Everyone wants shorter, not longer.
My IDE system (now using Swdcom) is about the same or faster than an equivalent C system (or I wouldn’t use it) but some Forth systems are unbearably slow and I personally don’t understand how anyone can be productive with such systems.
Some C systems are also unbearably slow, but as this is about Forth, so we don’t need to go there.
Quantifying Speed¶
Much of this will be subjective, anecdotal etc as precise timing may not be available at the time of testing, but I’ll update the records if better data is available.
Upload/compile Speed Table¶
The clear winner here is Swdcom by Jan Bramcamp which has a serial terminal that can also upload Forth source code.
Name |
Upload/compile (Bytes/sec) |
MCU |
Clock speed |
Upload Method |
Baud Rate |
Notes |
---|---|---|---|---|---|---|
19007 |
STM32F407 |
168Mhz |
swd |
? |
214,8 Words per second or 19007 bytes/second |
|
Piotr Wiszowaty |
5300 |
STM32G071 |
64 MHz |
picocom/xfr.py |
1 Mbaud |
xfr.py is by Piotr |
Mecrisp-Stellaris |
3873 |
STM32F052 |
72 MHz |
Usart,rts,screen |
460800 |
42606 bytes compiled, 0 errors in 11 seconds (hand timed) |
Notes¶
Piotr Wiszowaty¶
See: https://sourceforge.net/p/mecrisp/discussion/general/thread/e70032f82a/#2f25