[dmd-internals] [D-Programming-Language/dmd] f9b094: Increase temp space in mtype.c/Type::getTypeInfoId...

GitHub noreply at github.com
Sat Jan 11 23:07:19 PST 2014


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/dmd
  Commit: f9b094a1075953e69e466fd9a7c9eb39742065a7
      https://github.com/D-Programming-Language/dmd/commit/f9b094a1075953e69e466fd9a7c9eb39742065a7
  Author: kai <kai at redstar.de>
  Date:   2014-01-10 (Fri, 10 Jan 2014)

  Changed paths:
    M src/mtype.c

  Log Message:
  -----------
  Increase temp space in mtype.c/Type::getTypeInfoIdent(int)

Compiling druntime+phobos, this method is called 1245 times. 1104 times malloc()
is called - that's 89%! Increasing the size from 40 to 128, malloc() is only
called 128 times, which looks better. (Average length is 66.)
This may still too small - compiling some unit tests I have seen mangled names
with length up to 16745.

Alternatives are:
- use always malloc()
- use always alloca()

The same seems to be true variable out of type OutBuffer. But I do not have
collected the numbers here.


  Commit: a108b099cea6c3dd868503e744ec2a20cc9e418c
      https://github.com/D-Programming-Language/dmd/commit/a108b099cea6c3dd868503e744ec2a20cc9e418c
  Author: Walter Bright <walter at walterbright.com>
  Date:   2014-01-11 (Sat, 11 Jan 2014)

  Changed paths:
    M src/mtype.c

  Log Message:
  -----------
  Merge pull request #3078 from redstar/tempspace

Increase temp space in mtype.c/Type::getTypeInfoIdent(int)


Compare: https://github.com/D-Programming-Language/dmd/compare/2318831d2515...a108b099cea6


More information about the dmd-internals mailing list