Kris Jurka wrote:
Well, thanks a lot for the attention. My main purpose was to reduce the memory footprint. But, before I did the tests, I had the idea that the new method would be slower than the older ... So it would only be better on large files, i.e. where the reduced memory usage was more important than raw speed. This was because of the extra cycle through the array. The new method is very similar to the old, but it just computes the final size before the copy. The old method does less instructions to convert an array, the new method is only faster when the older is slowed down by garbage collection/memory allocation. I think the old option should be there for a while, but I hope that the new method proves to be as fast as the old, so we can just discard the MAX_3_BUFF_SIZE and always compute the final size - as the method code would be clearer that way. It's me who thanks for such a great product ... I will check the new benchmark, the see the memory usage, and garbage collection ...
--
Luis Flores Analista de Sistemas Evolute - Consultoria
Informática Tel: (+351) 212949689 AVISO DE CONFIDENCIALIDADE Esta mensagem de correio electrónico e eventuais ficheiros anexos são confidenciais e destinados apenas à(s) pessoa(s) ou entidade(s) acima referida(s), podendo conter informação privilegiada e confidencial, a qual não poderá ser divulgada, copiada, gravada ou distribuída nos termos da lei vigente. Caso não seja o destinatário da mensagem, ou se ela lhe foi enviada por engano, agradecemos que não faça uso ou divulgação da mesma. A distribuição ou utilização da informação nela contida é interdita. Se recebeu esta mensagem por engano, por favor notifique o remetente e apague este e-mail do seu sistema. Obrigado. CONFIDENTIALITY NOTICE This e-mail transmission and eventual attached files are intended only for the use of the individual(s) or entity(ies) named above and may contain information that is both privileged and confidential and is exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in this transmission is strictly restricted. If by any means you have received this transmission in error, please immediately notify the sender and delete this e-mail from your system. Thank you. |