On Friday, 3 September 2021 at 23:39:44 UTC, Per Nordlöw wrote:
When is a phobos unittest supposed to be qualified with version
`(StdUnittest)`? Ideally, always? I don't see that their
current use is consistenly following a rule. If so, is the
purpose of its presence to reduce the burd
On 9/4/21 4:05 PM, Per Nordlöw wrote:
On Saturday, 4 September 2021 at 13:12:49 UTC, Steven Schveighoffer wrote:
Note that lexing and parsing is extremely quick, and I wouldn't focus
on trying to trim this out, you won't get much performance out of that.
-Steve
For the record, a D file conta
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
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-
```
On Saturday, 4 September 2021 at 13:12:49 UTC, Steven
Schveighoffer wrote:
Note that lexing and parsing is extremely quick, and I wouldn't
focus on trying to trim this out, you won't get much
performance out of that.
-Steve
For the record, a D file containing only `import std;` type
checks
On 9/4/21 7:43 AM, Johan wrote:
On Saturday, 4 September 2021 at 03:18:01 UTC, Paul Backus wrote:
On Saturday, 4 September 2021 at 00:09:37 UTC, H. S. Teoh wrote:
This is related to the bogonity of the current behaviour of
-unittest, which compiles *all* unittests of *all* imported modules,
ev
On 9/4/21 5:42 AM, Per Nordlöw wrote:
On Saturday, 4 September 2021 at 03:18:01 UTC, Paul Backus wrote:
As Steven Schveighoffer [pointed out][1], Phobos unittests are never
included in user code, regardless of whether `StdUnittest` is used.
Yes, but they are lexed and parsed, right?
Yes, and
On Saturday, 4 September 2021 at 12:40:02 UTC, Per Nordlöw wrote:
Omg. It really seems like it's motivated to do a benchmark with
phobos unittests prefixed with
Should have been a reply to
The "never" is false, https://d.godbolt.org/z/c4oeYM7rG
On Saturday, 4 September 2021 at 12:40:02 UTC, Per Nordlöw wrote:
then. I can make that refactoring in my favorite choice of
editor and see the result differ. In terms of binary size, and
speed and memory usage of check, build and link time.
Automated that is.
If we want this, shall we format
On Saturday, 4 September 2021 at 12:31:33 UTC, Dennis wrote:
On Saturday, 4 September 2021 at 09:42:46 UTC, Per Nordlöw
wrote:
Yes, but they are lexed and parsed, right?
Right, but that's the case regardless of `version(StdUnittest)`.
Omg. It really seems like it's motivated to do a benchmar
On Saturday, 4 September 2021 at 12:31:33 UTC, Dennis wrote:
Right, but that's the case regardless of `version(StdUnittest)`.
I don't think so. My guess is that `version(StdUnittest)` does
maximum parsing, maybe only lexing. How can one easily determine
if this is the fact? Behaviour of `prag
On Saturday, 4 September 2021 at 09:42:46 UTC, Per Nordlöw wrote:
Yes, but they are lexed and parsed, right?
Right, but that's the case regardless of `version(StdUnittest)`.
On Saturday, 4 September 2021 at 03:18:01 UTC, Paul Backus wrote:
On Saturday, 4 September 2021 at 00:09:37 UTC, H. S. Teoh wrote:
This is related to the bogonity of the current behaviour of
-unittest, which compiles *all* unittests of *all* imported
modules, even when you're compiling user cod
On Saturday, 4 September 2021 at 03:18:01 UTC, Paul Backus wrote:
As Steven Schveighoffer [pointed out][1], Phobos unittests are
never included in user code, regardless of whether
`StdUnittest` is used.
Yes, but they are lexed and parsed, right?
On Friday, 3 September 2021 at 23:39:44 UTC, Per Nordlöw wrote:
When is a phobos unittest supposed to be qualified with version
`(StdUnittest)`?
Almost never.
`version (StdUnittest)` should be used in Phobos wherever you
would normally use a `version (unittest)` block. It is not for
the
On Saturday, 4 September 2021 at 00:09:37 UTC, H. S. Teoh wrote:
This is related to the bogonity of the current behaviour of
-unittest, which compiles *all* unittests of *all* imported
modules, even when you're compiling user code that has no
interest in Phobos unittests.
Well, no; it compile
On Fri, Sep 03, 2021 at 11:39:44PM +, Per Nordlöw via Digitalmars-d-learn
wrote:
> When is a phobos unittest supposed to be qualified with version
> `(StdUnittest)`? Ideally, always? I don't see that their current use
> is consistenly following a rule. If so, is the purpose o
When is a phobos unittest supposed to be qualified with version
`(StdUnittest)`? Ideally, always? I don't see that their current
use is consistenly following a rule. If so, is the purpose of its
presence to reduce the burden of the compiler when the
application using phobos is compiled
18 matches
Mail list logo