# Is there any benefit to uploading a config/flashing the board using any of the optimizations besides smallest code?

**URL:** <https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363>\
**Category:** ProffieOS\
**Created:** [September 10, 2022, 6:14pm UTC](https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363 "2022-09-10T18:14:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Eachus](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/brian_eachus/32/2976_2.png) [@Brian\_Eachus](https://crucible.hubbe.net/u/Brian_Eachus)\
**Post date:** [September 10, 2022, 6:14pm UTC](https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363/1 "2022-09-10T18:14:14Z")

</div>

If so, how the heck would you benchmark something like that?

I can just barely squeeze in basic defines, Fetts prop file, and 4 blade styles using the “fastest” optimization. (97%)

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [September 10, 2022, 6:56pm UTC](https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363/2 "2022-09-10T18:56:55Z")

</div>

Short answer: yes, sometimes

In particular, large, complicated styles can run very slowly in some cases. Especially if you have a blade with lots of pixels. (Like a zig-zag blade.) Turning on optimizations can make that much better.

The easy way to tell if optimizations are doing something is to use the `top` command in the serial monitor. It measures how much time is spent doing things, and it also shows blade FPS and number of idle loops per second. WIth optimizations, blade FPS and idle loops should go up.

Ultimately, if the blade FPS is high enough, optimizations won’t do anything that you will notice, and in that case there is no point.

---

<div class="post-metadata">

**Author:** ![Brian\_Eachus](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/brian_eachus/32/2976_2.png) [@Brian\_Eachus](https://crucible.hubbe.net/u/Brian_Eachus)\
**Post date:** [September 10, 2022, 7:06pm UTC](https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363/3 "2022-09-10T19:06:38Z")

</div>

Ah, thank you sir.

---

<div class="post-metadata">

**Author:** ![Brian\_Eachus](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/brian_eachus/32/2976_2.png) [@Brian\_Eachus](https://crucible.hubbe.net/u/Brian_Eachus)\
**Post date:** [September 20, 2022, 3:48am UTC](https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363/4 "2022-09-20T03:48:20Z")

</div>

Any issue with these Arduino errors if the upload completes and the saber appears to function as desired?

c:/users/rt\_br/appdata/local/arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe:C:\Users\rt\_br\AppData\Local\Arduino15\packages\proffieboard\hardware\stm32l4\3.6.0\variants\STM32L433CC-ProffieboardV2/linker\_scripts/STM32L433CC\_FLASH.ld:224: warning: memory region `SRAM2’ not declared  
In function ‘operator new’,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\fire.h:61:15,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\fire.h:115:68,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:105:30,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\remap.h:27:20,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\alpha.h:20:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\lockup.h:122:5:  
C:\Users\rt\_br\AppData\Local\Arduino15\packages\proffieboard\hardware\stm32l4\3.6.0\cores\stm32l4\new.cpp:22:16: warning: argument 1 value ‘4294967295’ exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]  
22 | return malloc(size);  
| ^  
C:\Users\rt\_br\AppData\Local\Arduino15\packages\proffieboard\hardware\stm32l4\3.6.0\cores\stm32l4\new.cpp: In member function ‘run’:  
c:\users\rt\_br\appdata\local\arduino15\packages\proffieboard\tools\arm-none-eabi-gcc\9-2020-q2-update\arm-none-eabi\include\malloc.h:37:14: note: in a call to allocation function ‘malloc’ declared here  
37 | extern void \*malloc (size\_t);  
| ^  
In function ‘operator new’,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\fire.h:61:15,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\fire.h:115:68,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:105:30,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:99:28,  
inlined from ‘RunLayer’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:111:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\layers.h:24:46,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:77:30,  
inlined from ‘RunStyle’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\blade\_style.h:87:61,  
inlined from ‘run’ at C:\Users\rt\_br\Desktop\Proffie\ProffieOS\styles\style\_ptr.h:82:18:  
C:\Users\rt\_br\AppData\Local\Arduino15\packages\proffieboard\hardware\stm32l4\3.6.0\cores\stm32l4\new.cpp:22:16: warning: argument 1 value ‘4294967295’ exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]  
22 | return malloc(size);  
| ^  
C:\Users\rt\_br\AppData\Local\Arduino15\packages\proffieboard\hardware\stm32l4\3.6.0\cores\stm32l4\new.cpp: In member function ‘run’:  
c:\users\rt\_br\appdata\local\arduino15\packages\proffieboard\tools\arm-none-eabi-gcc\9-2020-q2-update\arm-none-eabi\include\malloc.h:37:14: note: in a call to allocation function ‘malloc’ declared here  
37 | extern void \*malloc (size\_t);  
| ^  
Sketch uses 256944 bytes (98%) of program storage space. Maximum is 262144 bytes.  
dfu-util 0.9

---

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [September 20, 2022, 6:36am UTC](https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363/5 "2022-09-20T06:36:54Z")

</div>

These are all warnings that can be safely ignored.

---

<div class="post-metadata">

**Author:** ![Brian\_Eachus](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/brian_eachus/32/2976_2.png) [@Brian\_Eachus](https://crucible.hubbe.net/u/Brian_Eachus)\
**Post date:** [September 20, 2022, 6:49am UTC](https://crucible.hubbe.net/t/is-there-any-benefit-to-uploading-a-config-flashing-the-board-using-any-of-the-optimizations-besides-smallest-code/2363/6 "2022-09-20T06:49:59Z")

</div>

Excellent. Thank you sir
