From 9f03e27f9d180b47e0d9d0e5db93a0bc43b5630f Mon Sep 17 00:00:00 2001 From: Jon Hylands Date: Sun, 26 Jan 2014 16:36:53 -0800 Subject: [PATCH] Created Performance (markdown) --- Performance.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Performance.md diff --git a/Performance.md b/Performance.md new file mode 100644 index 0000000..be82a2a --- /dev/null +++ b/Performance.md @@ -0,0 +1,49 @@ +Here's a sample little tight counter loop, running for 10 seconds on 3 different setups: + +**MicroPython on Teensy 3.1: (96Mhz ARM)** + + endTime = pyb.millis() + 10000 + count = 0 + while pyb.millis() < endTime: + count += 1 + print("Count: ", count) + +**Count: 396,505** + +*** + +**C++ on Teensy 3.1: (96Mhz ARM)** + + #include + void setup() { + Serial1.begin(115200); + uint32_t endTime = millis() + 10000; + uint32_t count = 0; + while (millis() < endTime) + count++; + Serial1.print("Count: "); + Serial1.println(count); + } + void loop() { + } + +**Count: 95,835,923** + +*** + +**C++ on Arduino Pro Mini: (16 MHz Atmega328)** + + #include + void setup() { + Serial.begin(115200); + uint32_t endTime = millis() + 10000; + uint32_t count = 0; + while (millis() < endTime) + count++; + Serial.print("Count: "); + Serial.println(count); + } + void loop() { + } + +**Count: 4,970,227**