This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MicroLIB advantages and limitations?

In the Target-Options dialogue there is the possibility to use MicroLIB. Unfortunately I was unable to find details about this LIB. Can anybody tell what the main advantages of this lib are and what are the limitations? The only information I found is that the lib is not fully ANSI-C compatible. But no details.

Where can I find the documentation with details when I should use the lib and when better keep my hand off of it.

Parents Reply Children
  • Thank you for the links!

    Better to find "kind of sloppy" documentation than to don't know jack. But I aggree C51/C166 is suggestive to be documented more assiduously.

  • I wonder why it's slower?

    My guess is that the memcpy() function that they take as an example of a slower function just copies byte for byte.

    A good memcpy() does one or more byte copies until the data is perfectly aligned, and then runs 16-bit, 32-bit or maybe 64-bit loops before finally doing some optional odd bytes at the end of the transfer. This obviously makes the code larger.

    strstr() is also a function where you can look for a string by matching the start of the needle with current position, or instead optimize by matching the last character of needle and possibly be able to step many steps in case of a failed match.

    Lots of RTL functions can be written to be either small or smart, depending on goal.