Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 25, 2021 tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Hello, I noticed that importing some std libraries causes the build time to jump to around 1 - 3 secs. I started creating my own helper functions to avoid importing std for scripting and prototyping in order to keep the compile time at around 0.5 secs. I was wondering if anyone knows of any libraries that are geared towards something like this? Thanks |
March 01, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anthony | On Thursday, 25 February 2021 at 22:39:11 UTC, Anthony wrote:
> Hello,
>
> I noticed that importing some std libraries causes the build time to jump to around 1 - 3 secs.
>
> I started creating my own helper functions to avoid importing std for scripting and prototyping in order to keep the compile time at around 0.5 secs.
>
> I was wondering if anyone knows of any libraries that are geared towards something like this?
>
> Thanks
What part of std? Have you tried selective imports?
|
March 03, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote:
> On Thursday, 25 February 2021 at 22:39:11 UTC, Anthony wrote:
>> Hello,
>>
>> I noticed that importing some std libraries causes the build time to jump to around 1 - 3 secs.
>>
>> I started creating my own helper functions to avoid importing std for scripting and prototyping in order to keep the compile time at around 0.5 secs.
>>
>> I was wondering if anyone knows of any libraries that are geared towards something like this?
>>
>> Thanks
>
> What part of std? Have you tried selective imports?
Don't know specifically, but I tried doing this and it always eventually creeps over 2secs. Even with gold linker or rdmd.
Having a library with bare minimum meta programming would help with this I think. I'm willing to pay the cost of safety.
|
March 03, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anthony Quizon | On Wednesday, 3 March 2021 at 03:52:13 UTC, Anthony Quizon wrote: > On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote: > > Having a library with bare minimum meta programming would help with this I think. I'm willing to pay the cost of safety. Strange, usual D programs builds fast. As a alternative to Phobos, you can see to D1 standard library - Tango, ported to D2. https://github.com/SiegeLord/Tango-D2 Without mass template magic, its easier. There is also print book "Learn to Tango with D". |
March 03, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Siemargl | On Wednesday, 3 March 2021 at 07:23:58 UTC, Siemargl wrote: > On Wednesday, 3 March 2021 at 03:52:13 UTC, Anthony Quizon wrote: >> On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote: >> >> Having a library with bare minimum meta programming would help with this I think. I'm willing to pay the cost of safety. > Strange, usual D programs builds fast. > > As a alternative to Phobos, you can see to D1 standard library - Tango, ported to D2. > https://github.com/SiegeLord/Tango-D2 > > Without mass template magic, its easier. > > There is also print book "Learn to Tango with D". Thanks! I'll take a look. > Strange, usual D programs builds fast. What build times do you get? Seems like some other people have similar issues: https://forum.dlang.org/post/pvseqkfkgaopsnhqecdb@forum.dlang.org https://forum.dlang.org/thread/mailman.4286.1499286065.31550.digitalmars-d@puremagic.com |
March 03, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anthony | On Wednesday, 3 March 2021 at 09:02:54 UTC, Anthony wrote:
>> Strange, usual D programs builds fast.
>
> What build times do you get?
>
> Seems like some other people have similar issues:
> https://forum.dlang.org/post/pvseqkfkgaopsnhqecdb@forum.dlang.org
> https://forum.dlang.org/thread/mailman.4286.1499286065.31550.digitalmars-d@puremagic.com
All you mentioned are template issues. Some was fixed.
I test full rebuild of dlang-IDE (20k loc) now for dmd under Windows:
(Result is 5.5Mb .exe file)
-full rebuild with all libs take ~21s >dub build --build=debug --arch=x86_mscoff --force
-change one file and rebuild <7s >dub build --build=debug --arch=x86_mscoff
|
March 03, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Siemargl | On Wednesday, 3 March 2021 at 14:12:54 UTC, Siemargl wrote:
> I test full rebuild of dlang-IDE (20k loc) now for dmd under
Update, 20k loc without counting libraries.
|
March 03, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Siemargl | On Wednesday, 3 March 2021 at 14:17:02 UTC, Siemargl wrote:
> On Wednesday, 3 March 2021 at 14:12:54 UTC, Siemargl wrote:
>> I test full rebuild of dlang-IDE (20k loc) now for dmd under
>
> Update, 20k loc without counting libraries.
Thanks for the info.
Yeah the times I'm trying to reach are around 0.5secs so as to have the same feel as a scripting language.
I'm having some success pulling out small bits of code from other libraries and keeping things minimal and c-style-ish.
|
March 05, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anthony Quizon | On Wednesday, 3 March 2021 at 20:54:43 UTC, Anthony Quizon wrote: > I'm having some success pulling out small bits of code from other libraries and keeping things minimal and c-style-ish. If you're really ok with minimalism, I'm writing such a library https://filebin.net/7gtyh5j01gk1ofly I didn't publish it anywhere yet, feel free to do so. Not everything is finished there yet. |
March 05, 2021 Re: tiny alternative to std library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kagamin | On Friday, 5 March 2021 at 16:54:48 UTC, Kagamin wrote:
> On Wednesday, 3 March 2021 at 20:54:43 UTC, Anthony Quizon wrote:
>> I'm having some success pulling out small bits of code from other libraries and keeping things minimal and c-style-ish.
>
> If you're really ok with minimalism, I'm writing such a library https://filebin.net/7gtyh5j01gk1ofly
> I didn't publish it anywhere yet, feel free to do so. Not everything is finished there yet.
I was too looking for something like this, thanks! you should definitely host it somewhere, maybe on github, i'd love to contribute!
|
Copyright © 1999-2021 by the D Language Foundation