On Friday, 15 August 2014 at 16:48:10 UTC, monarch_dodra wrote:
If you are using "raw GC arrays", then the "raw" append operation will, outweigh the relocation cost on extension. So pre-allocation wouldn't really help in this situation (though the use of Appender *should*)

Is that because it's able to grab memory from the GC without actually having to allocate anything? Normally, I would have expected allocations to far outweigh the cost on extension and that preallocating would help a lot. But that would be with malloc or C++'s new rather than the GC, which has already allocated memory to reuse after it collects garbage.

- Jonathan M Davis
              • ... Dicebot via Digitalmars-d-learn
              • ... Philippe Sigaud via Digitalmars-d-learn
              • ... Messenger via Digitalmars-d-learn
              • ... Philippe Sigaud via Digitalmars-d-learn
              • ... monarch_dodra via Digitalmars-d-learn
              • ... monarch_dodra via Digitalmars-d-learn
              • ... Philippe Sigaud via Digitalmars-d-learn
              • ... monarch_dodra via Digitalmars-d-learn
              • ... Philippe Sigaud via Digitalmars-d-learn
              • ... monarch_dodra via Digitalmars-d-learn
              • ... Jonathan M Davis via Digitalmars-d-learn
              • ... monarch_dodra via Digitalmars-d-learn
        • Re: Appender ... Jonathan M Davis via Digitalmars-d-learn
      • Re: Appender is .... Dicebot via Digitalmars-d-learn
  • Re: Appender is ... slow Joseph Rushton Wakeling via Digitalmars-d-learn
  • Re: Appender is ... slow Jonathan M Davis via Digitalmars-d-learn

Reply via email to