November 28, 2008 Two C99 features | ||||
---|---|---|---|---|
| ||||
In C99 there are two features that may be useful in D programs too: 1) The restrict keyword: http://en.wikipedia.org/wiki/Restrict http://www.cellperformance.com/mike_acton/2006/05/demystifying_the_restrict_keyw.html 2) And the stack allocated variable-length arrays (that reduce most of the need for alloca() and can be used for small arrays): http://en.wikipedia.org/wiki/Variable-length_array This is less necessary in D because it has built-in dynamic arrays, but for small arrays it can be useful, as a performance optimization feature. Are there proposals of adding them to D? Bye, bearophile |
Copyright © 1999-2021 by the D Language Foundation