-3

Because C99 allows for things such as VLAs, does this actually cause a measurable performance difference?

2
  • 1
    write you specific code and get a profile of it. if it doesnt make noticeable difference, dont mind it for that application.
    – Arashium
    Jan 21, 2015 at 15:43
  • I would expect that you only pay for what you use! Code which does not use VLAs would have no reason to perform differently. And for most purposes the performance difference due to VLAs would be insignificant. What would make more of a difference is which compiler you're using and how well it optimizes. It's quite possible that a C99 compiler, being more recent, might use more sophisticated optimization techniques. Or maybe not. If in doubt, write a simple test program, compile with 2 different compilers, and test it for yourself! :)
    – Baldrick
    Jan 21, 2015 at 15:49

1 Answer 1

1

Providing some new features in a language does not necessarily means that it will improve performance. VLAs are added to C language for creating small arrays on stack without wasting space. In C11, VLA is optional.

Not the answer you're looking for? Browse other questions tagged or ask your own question.