B4R Question b4r compile size

kohle

Active Member
Licensed User
Longtime User
Hi,

I compared the size for a simple blink program uploaded to the UNO.

The size of b4r is nearly 6 times bigger than the output build with the Arduino editor.
See screenshots.

Adding timer,astream,lcd it use 13KB, about 42% of the 32KB memory and 32% global variable space.

I dont know if my sketch for my robot will fit with B4R compiling.

Will the compiling be optimized in the future ?
 

Attachments

  • 27-05-_2016_13-49-12.png
    27-05-_2016_13-49-12.png
    61.9 KB · Views: 324
  • 27-05-_2016_13-47-45.png
    27-05-_2016_13-47-45.png
    74.8 KB · Views: 329

sorex

Expert
Licensed User
Longtime User
it probably has a set of subroutines in it comparable to the core lib in B4A/B4i.
 
Upvote 0

kohle

Active Member
Licensed User
Longtime User
Low-level programming for embedded systems is quite different from programming for general purpose devices, such as computers and cell phones.
Efficiency (in terms of speed and space) is far more important because resources are at a premium.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Adding timer,astream,lcd it use 13KB, about 42% of the 32KB memory and 32% global variable space.
Half of the size comes from the native LCD library.

The B4R framework is very thin. The size of the framework is mostly constant. It will not grow when your program code grows.
In most cases (like in the case you posted above) the size of the native libraries will outweigh the size of your code and the B4R internal libraries.
 
Upvote 0
Top