On Saturday, 11 April 2015 at 20:45:25 UTC, Kagamin wrote:
Parsers unique duplicated strings via a name table:
string udup(string s, ref string[string] nameTable)
{
if(s in nameTable)return nameTable[s];
string s1=s.dup;
nameTable[s1]=s1;
return s1;
}
This way you avoid extra duplicates.
On Saturday, 11 April 2015 at 20:45:25 UTC, Kagamin wrote:
Parsers unique duplicated strings via a name table:
string udup(string s, ref string[string] nameTable)
{
if(s in nameTable)return nameTable[s];
string s1=s.dup;
nameTable[s1]=s1;
return s1;
}
This way you avoid extra duplicates.
Parsers unique duplicated strings via a name table:
string udup(string s, ref string[string] nameTable)
{
if(s in nameTable)return nameTable[s];
string s1=s.dup;
nameTable[s1]=s1;
return s1;
}
This way you avoid extra duplicates. You can also try to free
file content manually when it's p
On Friday, 10 April 2015 at 13:47:52 UTC, Kagamin wrote:
On Tuesday, 7 April 2015 at 15:28:21 UTC, jicman wrote:
H... Will you be able to give me an example of what is bad
and then fix that bad to a good? This may be my problem...
maybe
aTUs = AddToTrackerRepeat(aTUs, source.dup, fn, 1, t
On Tuesday, 7 April 2015 at 08:58:31 UTC, Kagamin wrote:
Depends on how you fill aTUs.
Ok, I will bite... ;-)
I have the wText string which could be 20 mgs or so, I start
finding pieces of data like this,
wText = wText[std.string.find(wText,"") + 5 .. $];
so, everything before , including i
On Tuesday, 7 April 2015 at 09:03:19 UTC, Kagamin wrote:
For example if you slice the original string, it will be
preserved in memory. That's why parsers keep parsed substrings
by duplicating them - this can result in smaller memory
footprint.
H... Will you be able to give me an example o
For example if you slice the original string, it will be
preserved in memory. That's why parsers keep parsed substrings by
duplicating them - this can result in smaller memory footprint.
Depends on how you fill aTUs.
Greetings.
I am using,
15:32:35.63>dmd
Digital Mars D Compiler v1.046
Copyright (c) 1999-2009 by Digital Mars written by Walter Bright
Documentation: http://www.digitalmars.com/d/1.0/index.html
And I have a program that reads a file into UTF8 and does a
series of string handling to create rep
== Quote from Robert Clipsham (rob...@octarineparrot.com)'s article
> CTFE and templates will use up the most memory - particularly if you use
> a lot of strings, as the memory allocated is never freed. You can work
> around it be compiling files one at a time or a few at a time, so
> instead of:
>
On 24/01/11 22:14, %u wrote:
How do I get dmd's memory usage a few hundred MBs down?
I keep having to close everything in order not to get an out of memory error
while compiling (-w -full).
I'd like to get it from 700-800 to below 400 :)
Any way to inspect which part is the biggest drain?
CTFE
Er, bit exaggerated..
450 to below 300 pls :)
How do I get dmd's memory usage a few hundred MBs down?
I keep having to close everything in order not to get an out of memory error
while compiling (-w -full).
I'd like to get it from 700-800 to below 400 :)
Any way to inspect which part is the biggest drain?
13 matches
Mail list logo