[Issue 10864] New: [REG 2.064][PERFORMANCE] new Safe appender is slower than "~="

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 21 03:19:51 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10864

           Summary: [REG 2.064][PERFORMANCE] new Safe appender is slower
                    than "~="
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: performance
          Severity: blocker
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: monarchdodra at gmail.com


--- Comment #0 from monarchdodra at gmail.com 2013-08-21 03:19:47 PDT ---
The new Appender is now @safe and pure. This was done mostly by
https://github.com/D-Programming-Language/phobos/pull/1337 , which is done with
heavy usage of the trusted lambda idiom, eg:

() @trusted {unsafe code here;} ();

The problem is that doing this has a very high runtime cost.

Currently, my benches get improved performance by *not* using appender.

This can be fixed either by using the same "named" idiom:
void do_it() @trusted {unsafe code here;}
do_it();

(for reasons I do not understand, *that* has no extra runtime cost, even in
non-optimized/non-inline mode).

Or by fixing:
http://d.puremagic.com/issues/show_bug.cgi?id=10848

Appender being one of the "foundation" blocks of most of phobos, this is
arguably a permance-blocker.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list