On Friday, February 14, 2020 at 3:32:54 AM UTC+1, robert engels wrote: > > You can clearly see that the vast majority of CPU time was consumed by > allocation and de-allocation. >
In the case of this particular benchmark, it is pointless to be pointing out the cost of individual malloc+free calls because the memory is being deallocated in a for-loop: for(o in object-list) { delete o; } and it is probable that most experienced C++ programmers would during optimization convert this for-loop to use delete[] or use std::vector to hold the objects. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/68217d56-e01d-4046-8f25-b773cf38afbb%40googlegroups.com.