[phobos] [D-Programming-Language/phobos] 88ad91: Size optimisation of std.datetime (saves 12KB)

noreply at github.com noreply at github.com
Thu Dec 1 13:32:55 PST 2011


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos

  Commit: 88ad91f47ac2351a25e95a4e1c3ccdeed6974887
      https://github.com/D-Programming-Language/phobos/commit/88ad91f47ac2351a25e95a4e1c3ccdeed6974887
  Author: Peter Alexander <peter.alexander.au at gmail.com>
  Date:   2011-12-01 (Thu, 01 Dec 2011)

  Changed paths:
    M std/datetime.d

  Log Message:
  -----------
  Size optimisation of std.datetime (saves 12KB)

Large switch statements have been replaced by data-driven array lookups to reduce the amount of code generated and also improve performance. Using DMD 2.056 on OSX x86 this cuts 12KB off of a Hello World program.

The motivation for this change is to try and reduce the size of small D programs as their large size is a common (and valid) complaint amongst newcomers.


  Commit: 5395566a8f83e2885fc944910fc6821faf7a57dd
      https://github.com/D-Programming-Language/phobos/commit/5395566a8f83e2885fc944910fc6821faf7a57dd
  Author: Jonathan M Davis <jmdavisProg at gmx.com>
  Date:   2011-12-01 (Thu, 01 Dec 2011)

  Changed paths:
    M std/datetime.d

  Log Message:
  -----------
  Merge pull request #341 from Poita/datetime-size-opt

Size optimisation of std.datetime (saves 12KB)


Compare: https://github.com/D-Programming-Language/phobos/compare/09c57ff...5395566


More information about the phobos mailing list