digitalmars.D.bugs - [Issue 4859] New: Another File.byChunk()
- d-bugmail puremagic.com (27/27) Sep 13 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4859
- d-bugmail puremagic.com (10/10) Jan 09 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4859
- d-bugmail puremagic.com (6/6) Mar 12 2013 http://d.puremagic.com/issues/show_bug.cgi?id=4859
http://d.puremagic.com/issues/show_bug.cgi?id=4859 Summary: Another File.byChunk() Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc std.stdio.File.byChunk reuses the content of buffer across calls, but I think the first call performs an allocation. Tango has shown that an important factor for the performance of D programs is to minimize memory allocations. So an overloaded byChunk may be added with a signature similar to (so the older byChunk() is not removed, this is added): chunks byChunk(void[] buffer); So you may use it like this and avoid the first memory allocation too: ubyte[4096] buffer; foreach (ubyte[] chunk; stdin.byChunk(buffer[])) { ... use chunk ... } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 13 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4859 Andrei Alexandrescu <andrei metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |andrei metalanguage.com AssignedTo|nobody puremagic.com |andrei metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4859 PDT --- https://github.com/D-Programming-Language/phobos/pull/1203 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 12 2013