Pages: [1]   Go Down
Author Topic: Estimating sketch size  (Read 726 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, is there any way to estimate the size of a program before writing it?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hi, is there any way to estimate the size of a program before writing it?
Only in the vaguest possible terms, like small, humongous, and "won't fit".

Now, with some idea what hardware you are interfacing with, and the requirements for the application, then the estimate can be made a bit more accurate.
Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are working with large arrays and so on -- yes -- to that extent.

Otherwise you have to do what I do -- I compile the code before I write it. That way I don't have to guess.
Logged

Just another Hacker

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12483
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hi, is there any way to estimate the size of a program before writing it?
1) experience^2 is needed
2) if you use libraries with known size helps a lot
3) usage of floating point adds approx 3-4K to your code. (is also a lib)
4) the complexity of the algorithms needed
5) the amount of storage (including temporary) needed
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: