It's a long story and I will return in a few months and give
you
the whole story, but right now, time is not on my side. I have
answers for all the questions you folks have asked, and I
appreciate all the input. I have the answer that I was looking
for, so in a few months, I will come back and
Am 07.08.2013 06:30, schrieb jicman:
Again, what are you trying to achieve?
Your statement is not necessarily true, for a myriad of
reasons, but it entirely depends on what you want to do.
I would reiterate Dennis Luehring's reply, why are you not
benching? It seems like you are guessing at what
On Tuesday, 6 August 2013 at 14:49:42 UTC, Andre Artus wrote:
On Tuesday, 6 August 2013 at 12:32:13 UTC, jicman wrote:
On Tuesday, 6 August 2013 at 04:10:57 UTC, Andre Artus wrote:
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.
On Tuesday, 6 August 2013 at 12:32:13 UTC, jicman wrote:
On Tuesday, 6 August 2013 at 04:10:57 UTC, Andre Artus wrote:
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0
On Tue, Aug 06, 2013 at 02:32:11PM +0200, jicman wrote:
> On Tuesday, 6 August 2013 at 04:10:57 UTC, Andre Artus wrote:
[...]
> >What exactly are you trying to do with this? I get the impression
> >that there is an attempt at "local optimization" when broader
> >approach could lead to better result
On 8/5/13, H. S. Teoh wrote:
> If you really want optimal performance, use std.regex:
Yes and if you also want to bloat your executable to the point that
other parts of the system start slowing down.
On Tuesday, 6 August 2013 at 04:10:57 UTC, Andre Artus wrote:
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls"
On Monday, August 05, 2013 15:59:23 jicman wrote:
> Greetings!
>
> I have this code,
>
> foreach (...)
> {
>
>if (std.string.tolower(fext[0]) == "doc" ||
> std.string.tolower(fext[0]) == "docx" ||
> std.string.tolower(fext[0]) == "xls" ||
> std.string.tolower(fext[0]) == "xlsx
Am 05.08.2013 19:04, schrieb jicman:
so its totaly unclear if the presented code is your 2h monster,
what was
the runtime of your jscript?
The files are in a network drive, so, that has some slowness
already involved because of that. The jscript use to take over 8
hours. The new D program has
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string.tolower(fext[0]) == "xlsx" ||
std.stri
Le 05/08/2013 15:59, jicman a écrit :
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string.tolower(fext[0]) == "xlsx" ||
std.string.tolower(fe
On Mon, Aug 05, 2013 at 07:30:36PM +0200, JS wrote:
> On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
> >
> >Greetings!
> >
> >I have this code,
> >
> >foreach (...)
> >{
> >
> > if (std.string.tolower(fext[0]) == "doc" ||
> >std.string.tolower(fext[0]) == "docx" ||
> >std.string.t
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string.tolower(fext[0]) == "xlsx" ||
std.stri
On 08/05/2013 10:04 AM, jicman wrote:
> The files are in a network drive, so, that has some slowness already
> involved because of that.
Which may dominate the running time.
> The jscript use to take over 8 hours. The new D program has
> dropped that to under less than six.
And that is proof
On Monday, 5 August 2013 at 17:04:36 UTC, monarch_dodra wrote:
On Monday, 5 August 2013 at 15:18:42 UTC, John Colvin wrote:
better:
foreach (...)
{
auto tmp = std.string.tolower(fext[0]);
if(tmp == "doc" || tmp == "docx"
|| tmp == "xls" || tmp == "xlsx"
|| tmp == "ppt" || tmp
On Monday, 5 August 2013 at 15:27:09 UTC, dennis luehring wrote:
Am 05.08.2013 17:18, schrieb jicman:
>
It is a tool that was a script, but I have turned it into do,
which now has taken two hours from the last jscript script. I
have not benchmarked it, yet. I may. But I see that a great
idea
On Monday, 5 August 2013 at 15:18:42 UTC, John Colvin wrote:
better:
foreach (...)
{
auto tmp = std.string.tolower(fext[0]);
if(tmp == "doc" || tmp == "docx"
|| tmp == "xls" || tmp == "xlsx"
|| tmp == "ppt" || tmp == "pptx")
{
continue;
}
}
but still not s
On Monday, 5 August 2013 at 15:21:25 UTC, David wrote:
Am 05.08.2013 15:59, schrieb jicman:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string.tolow
On Monday, 5 August 2013 at 15:18:42 UTC, John Colvin wrote:
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" |
On Mon, Aug 05, 2013 at 04:47:36PM +0200, dennis luehring wrote:
> > Ok, how would you make it faster?
>
> i don't see a better solution here - how to reduce ONE lowercase and
> SOME compares in any way? (i dont think a hash or something will
> help) but i know that anything like your continue-par
Am 05.08.2013 17:18, schrieb jicman:
>
It is a tool that was a script, but I have turned it into do,
which now has taken two hours from the last jscript script. I
have not benchmarked it, yet. I may. But I see that a great
idea has been provided, which I will use. Thanks for the help.
> hav
Am 05.08.2013 15:59, schrieb jicman:
>
> Greetings!
>
> I have this code,
>
> foreach (...)
> {
>
> if (std.string.tolower(fext[0]) == "doc" ||
> std.string.tolower(fext[0]) == "docx" ||
> std.string.tolower(fext[0]) == "xls" ||
> std.string.tolower(fext[0]) == "xlsx" ||
> std
On Monday, 5 August 2013 at 14:50:27 UTC, bearophile wrote:
jicman:
How would you make it faster in D1?
Compute std.string.tolower(fext[0]) and put it in a temporary
variable. And then compare that variable with all your string
literals. In most cases that's fast enough. If it's not enough,
On Monday, 5 August 2013 at 14:47:37 UTC, dennis luehring wrote:
> Ok, how would you make it faster?
i don't see a better solution here - how to reduce ONE
lowercase and SOME compares in any way? (i dont think a hash or
something will help) but i know that anything like your
continue-party is
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string.tolower(fext[0]) == "xlsx" ||
std.stri
jicman:
How would you make it faster in D1?
Compute std.string.tolower(fext[0]) and put it in a temporary
variable. And then compare that variable with all your string
literals. In most cases that's fast enough. If it's not enough,
you could create a little finite state machine that represe
> Ok, how would you make it faster?
i don't see a better solution here - how to reduce ONE lowercase and
SOME compares in any way? (i dont think a hash or something will help)
but i know that anything like your continue-party is worth nothing
(feels a little bit like script-kiddies "do it with
On Mon, Aug 05, 2013 at 03:59:23PM +0200, jicman wrote:
>
> Greetings!
>
> I have this code,
>
> foreach (...)
> {
>
> if (std.string.tolower(fext[0]) == "doc" ||
> std.string.tolower(fext[0]) == "docx" ||
> std.string.tolower(fext[0]) == "xls" ||
> std.string.tolower(fext[0]) ==
On Monday, 5 August 2013 at 14:27:43 UTC, dennis luehring wrote:
did you benchmarked your current szenario - how do you know
that this is the slow part - or are you working on an
only-extension-compare-tool?
btw: they are both equal and slow - and full of partly
code-duplication
std.string.to
did you benchmarked your current szenario - how do you know that this is
the slow part - or are you working on an only-extension-compare-tool?
btw: they are both equal and slow - and full of partly code-duplication
std.string.tolower(fext[0]) multiple times, i hope your list isn't going
much lo
On 08/05/2013 03:59 PM, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string.tolower(fext[0]) == "xlsx" ||
std.string.tolower(fe
On Monday, 5 August 2013 at 14:13:33 UTC, Timon Gehr wrote:
On 08/05/2013 03:59 PM, jicman wrote:
Greetings!
I have this code,
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string
On Monday, 5 August 2013 at 13:59:24 UTC, jicman wrote:
Greetings!
I have this code,
First option...
foreach (...)
{
if (std.string.tolower(fext[0]) == "doc" ||
std.string.tolower(fext[0]) == "docx" ||
std.string.tolower(fext[0]) == "xls" ||
std.string.tolower(fext[0]) == "xl
33 matches
Mail list logo