On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that
it's quite
ea
Hi Sergey,
While the unordered map doesn't guarantee an ordering (since its
contents are
hashed), the order should remain static if you don't insert or
delete.
Hi JG,
Thanks for the red-black tree reference. I'll read up on it in
case I need it
but I'd prefer to use the built-in O(1) hash
On 10/21/22 6:03 PM, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that it's quite
easy to iterate through
On 10/21/22 15:03, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that it's quite
easy to iterate through t
On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that
it's quite
ea
On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that
it's quite
ea
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that it's
quite
easy to iterate through the whole "map", but not start from the
mi
On Friday, 21 October 2022 at 16:32:17 UTC, Hipreme wrote:
Hey guys, I have been complaining a lot of time right now from
D compilation speed at least for my project.
I have:
- Underused CTFE
- Underused Templates
- Avoided importing standard libraries
- Created a multi module projects for bett
Make sure you have the latest version of DMD
Make sure your antivirus isn't blocking your files (scanning),
it's a common thing with Windows, whitelist dmd folder, your dev
folder and dub folder
I tried your project:
Linux x64
```
git clone https://github.com/MrcSnm/HipremeEngine.git
cd HipremeEngine
dub build (once to download dependencies if any)
time dub build -f
real0m4.604s
user0m3.686s
sys 0m0.900s
```
4.6 sec for a FULL rebuild doesn't seem that bad
and
```
real
On Friday, 21 October 2022 at 14:34:47 UTC, ag0aep6g wrote:
Nitpick: You cannot iterate a true input range twice. You need
a forward range for that.
Nitpick²: you don't actually need to iterate the range twice
```d
//version=AllowMalloc;
auto toCStringThen(alias dg, Range)(Range src) /*nothrow
On Fri, Oct 21, 2022 at 04:32:17PM +, Hipreme via Digitalmars-d-learn wrote:
> Hey guys, I have been complaining a lot of time right now from D
> compilation speed at least for my project.
>
> I have:
> - Underused CTFE
> - Underused Templates
> - Avoided importing standard libraries
> - Creat
Hey guys, I have been complaining a lot of time right now from D
compilation speed at least for my project.
I have:
- Underused CTFE
- Underused Templates
- Avoided importing standard libraries
- Created a multi module projects for better code reuse
Those are all the techniques I have tried to
On Friday, 21 October 2022 at 13:49:01 UTC, cc wrote:
```d
//version=AllowMalloc;
auto toCStringThen(alias dg, Range)(Range src) /*nothrow*/ if
(isInputRange!Range && !isInfinite!Range) {
```
[...]
May need to be cleaned up for character types and needs to
iterate twice if allocations are goi
Catching up on the DConf '22 videos, really enjoyed the tricks
Walter presents here for no-allocation strings:
[DConf '22: Strawberries and Cream aka Delightful Emergent
Properties of D -- Walter
Bright](https://www.youtube.com/watch?v=iuP-AWUyjp8)
In the Q&A segment, the first question aske
On Thursday, 20 October 2022 at 14:03:10 UTC, tchaloupka wrote:
Hi,
I've found strange behavior where:
```D
import std.stdio;
struct Foo
{
@disable this(this);
int x;
}
void test(Foo[] foos...)
{
foreach (ref f; foos) {
writeln(&f, ": ", f.x);
f.x = 0;
}
}
void
Hi D-community.
I try to build and run very simple code on Alpine docker image -
but have no luck with static builds and LTO.
The desired aim is to be able build it similar to C code
compilation:
```c
gcc leibniz.c -o leibniz -O3 -s -static -flto -march=native
-mtune=native -fomit-frame-poi
17 matches
Mail list logo