Thank you to all of you for your time and your comments :D
MiiNiPaa:
Your amazing code taught me something new: It is something new for me the short names for data types like unsigned int. I like it!
I should indicate better, which code contains exactly what be want to achieve: We search the better performance when shrinking an undefined number of random arrays to avoid the waste of memory when it is needed. (Note that 90% of times computers have enough memory and they can waste some gigabytes for a short time).
Shrinking of arrays and shrinking of vectors comparison:
http://ncomputers.org/content/code.php?src=examples/shrink%20arrays%201.cpp
JLBorges:
Thank you very much for your comment, you taught me something new!
keskiverto:
You can find what we are purposing to improve dynamic arrays on C++, allowing to shrink them using the delete[] operator here:
http://ncomputers.org/content/code.php?src=suggestions/shrink%20arrays%20cpp
Cire:
We want to write correct and usable code. Maybe we're not explaining exactly what we want to achieve. I ask you please to be patient with us. English is a foreign language for us. To write an answer, which describes at best our ideas and point of views, is most times a task, which requires more free time, than we have.
Dhayden:
We are suggesting standard shrinkable arrays, which could be useful on some cases.
Have you examined your algorithms? Profiled the code? |
Yes: shrinkable arrays could optimize one of our newest codes, which we will publish soon.
Best regards,
http://ncomputers.org