Phobos Unittest

jfondren julian.fondren at gmail.com
Sat Sep 4 23:36:47 UTC 2021


On Saturday, 4 September 2021 at 20:06:27 UTC, Per Nordlöw wrote:
> On Saturday, 4 September 2021 at 20:05:17 UTC, Per Nordlöw 
> wrote:
>> ```sh
>> time dmd import_std.d -o-
>> ```
>
> should be
>
> ```sh
> time dmd -unittest import_std.d -o-
> ```

When you generate the object files, I get 13K vs. 75K from a file 
containing just `import std;`. More than parsing is happening 
differently.

```
$ objdump -dwr --no-show-raw-insn importstd.o |ddemangle | grep 
-oP 'std[\w.]+'|sort|uniq -c|sort -n|awk '$1 > 1'
      28 std.uni.InversionList
      28 std.uni.MultiArray
      30 std.encoding.BOM
      31 std.array.Appender
      35 std.concurrency.List
      35 std.concurrency.Message
      38 std.uni.CowArray
      44 std.variant.VariantN
      56 std.typecons.Tuple
      56 std.uni.BitPacked
      66 std.uni.GcPolicy
```


More information about the Digitalmars-d-learn mailing list