On 11/3/23 2:30 AM, Steven Schveighoffer wrote:
On Thursday, 2 November 2023 at 15:46:23 UTC, confuzzled wrote:
You should use a buffering library like iopipe to write properly here
(it handles the encoding of text for you).
Thanks Steve, I will try that.
Good morning,
First, thanks to you, Steve, and Julian for responding to my inquiry.
On 11/3/23 4:59 AM, Sergey wrote:
On Thursday, 2 November 2023 at 15:46:23 UTC, confuzzled wrote:
I've ported a small script from C to D. The original C version takes
roughly 6.5 minutes to parse a 12G file w
On Thursday, 2 November 2023 at 15:46:23 UTC, confuzzled wrote:
I've ported a small script from C to D. The original C version
takes roughly 6.5 minutes to parse a 12G file while the port
originally took about 48 minutes.
In my experience I/O in D is quite slow.
But you can try to improve it:
On Thursday, 2 November 2023 at 15:46:23 UTC, confuzzled wrote:
I tried std.io but write() only outputs ubyte[] while I'm
trying to output text so I abandoned idea early.
Just specifically to answer this, this is so you understand this
is what is going into the file -- bytes.
You should use
On Thursday, 2 November 2023 at 15:46:23 UTC, confuzzled wrote:
I've ported a small script from C to D. The original C version
takes roughly 6.5 minutes to parse a 12G file while the port
originally took about 48 minutes. My naïve attempt to improve
the situation pushed it over an hour and 15 m
I've ported a small script from C to D. The original C version takes
roughly 6.5 minutes to parse a 12G file while the port originally took
about 48 minutes. My naïve attempt to improve the situation pushed it
over an hour and 15 minutes. However, replacing std.stdio:File with
core.stdc.stdio:F
On 05/13/2017 09:15 PM, JV wrote:
> it doesn't pause and store but just keeps reading
>
> string studNum;
>
> readf("%s",&studNum);
> write(studNum);
That's the normal behavior for reading into strings. If you want to read
to the end of the line, try this:
import std.st
On Sunday, 14 May 2017 at 04:15:02 UTC, JV wrote:
Hey i'm not sure if i should create a new post for this but
how should i fix this it doesn't pause and store but just keeps
reading
string studNum;
readf("%s",&studNum);
write(studNum);
Can you say exactly what you ne
On Monday, 8 May 2017 at 10:34:42 UTC, k-five wrote:
On Monday, 8 May 2017 at 10:22:53 UTC, JV wrote:
On Monday, 8 May 2017 at 09:26:48 UTC, k-five wrote:
On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote:
---
If I continue to learn D I will do b
On Monday, 8 May 2017 at 10:22:53 UTC, JV wrote:
On Monday, 8 May 2017 at 09:26:48 UTC, k-five wrote:
On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote:
---
If I continue to learn D I will do but there is no guarantee
and it got ready :)
https://g
On Monday, 8 May 2017 at 09:26:48 UTC, k-five wrote:
On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote:
[...]
---
Do not worry. Your request is not rude. I give you a better
tool. I finished to collect some examples in D and in a few
days I will
On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote:
On Sunday, 7 May 2017 at 16:40:50 UTC, k-five wrote:
On Sunday, 7 May 2017 at 15:59:25 UTC, JV wrote:
---
Do not worry. Your request is not rude. I give you a better tool.
I finished to collect so
On Sunday, 7 May 2017 at 16:40:50 UTC, k-five wrote:
On Sunday, 7 May 2017 at 15:59:25 UTC, JV wrote:
[...]
[...]
--
You have the right for confusing :) there is many read and
write names. But I assumed you are familiar w
On Sunday, 7 May 2017 at 15:59:25 UTC, JV wrote:
On Sunday, 7 May 2017 at 15:16:58 UTC, k-five wrote:
On Sunday, 7 May 2017 at 13:57:47 UTC, JV wrote:
I'm kinda getting it but how do i write the stored user
input(string) varaible into a .txt??im getting confused since D
has so many read and
On Sunday, 7 May 2017 at 15:16:58 UTC, k-five wrote:
On Sunday, 7 May 2017 at 13:57:47 UTC, JV wrote:
Hi guys
I'd like to know how to get an input from the user to be
stored in a .txt file using import std.file and is it possible
to directly write in a .txt file without using a variable to
s
On Sunday, 7 May 2017 at 13:57:47 UTC, JV wrote:
Hi guys
I'd like to know how to get an input from the user to be stored
in a .txt file using import std.file and is it possible to
directly write in a .txt file without using a variable to store
the user input?
Thanks for the answer in advanc
On Sunday, 7 May 2017 at 13:57:47 UTC, JV wrote:
Hi guys
I'd like to know how to get an input from the user to be stored
in a .txt file using import std.file and is it possible to
directly write in a .txt file without using a variable to store
the user input?
Thanks for the answer in advanc
Hi guys
I'd like to know how to get an input from the user to be stored
in a .txt file using import std.file and is it possible to
directly write in a .txt file without using a variable to store
the user input?
Thanks for the answer in advance my mind is kinda jumbled about
this since im ne
Am 04.09.2011, 19:01 Uhr, schrieb Christian Köstlin
:
On 9/3/11 7:53 , dennis luehring wrote:
Am 26.08.2011 19:43, schrieb Christian Köstlin:
Hi guys,
i started the thread:
http://stackoverflow.com/questions/7202710/fastest-way-of-reading-bytes-in-d2
on stackoverflow, because i ran into k
On 9/3/11 7:53 , dennis luehring wrote:
Am 26.08.2011 19:43, schrieb Christian Köstlin:
Hi guys,
i started the thread:
http://stackoverflow.com/questions/7202710/fastest-way-of-reading-bytes-in-d2
on stackoverflow, because i ran into kind of a problem.
i wanted to read data from a file (or e
On 9/1/11 7:24 , David Nadlinger wrote:
On 9/1/11 7:12 AM, Christian Köstlin wrote:
Update:
I added performance tests for ldc and gdc with the same programs.
The results are interesting (please see the github page for the details).
Oh wow, LDC must accidentally call some druntime functions fo
Am 26.08.2011 19:43, schrieb Christian Köstlin:
Hi guys,
i started the thread:
http://stackoverflow.com/questions/7202710/fastest-way-of-reading-bytes-in-d2
on stackoverflow, because i ran into kind of a problem.
i wanted to read data from a file (or even better from a stream, but
lets stay wi
On 9/1/11 7:12 AM, Christian Köstlin wrote:
Update:
I added performance tests for ldc and gdc with the same programs.
The results are interesting (please see the github page for the details).
Oh wow, LDC must accidentally call some druntime functions for the
ubyte[1] case, or something simila
Update:
I added performance tests for ldc and gdc with the same programs.
The results are interesting (please see the github page for the details).
regards
christian
On 8/26/11 19:43 , Christian Köstlin wrote:
Hi guys,
i started the thread:
http://stackoverflow.com/questions/7202710/fastest
On 8/26/11 23:56 , bearophile wrote:
Steven Schveighoffer:
In fact, it would probably be faster.
I suggest the OP to keep us updated on this matter. And later after some time,
if no solutions are found, to bring the issue to the main D newsgroup and to
Bugzilla too. This is a significant is
Christian Köstlin Wrote:
> after some optimizing i got better, but was still way slower than c++.
> so i started some small microbenchmarks regarding fileio:
> https://github.com/gizmomogwai/performance in c++, java and d2.
>
> christian
Hello!
Thanks for you effort in putting this together!
Steven Schveighoffer:
> In fact, it would probably be faster.
I suggest the OP to keep us updated on this matter. And later after some time,
if no solutions are found, to bring the issue to the main D newsgroup and to
Bugzilla too. This is a significant issue.
Bye,
bearophile
On Fri, 26 Aug 2011 13:43:23 -0400, Christian Köstlin
wrote:
Hi guys,
i started the thread:
http://stackoverflow.com/questions/7202710/fastest-way-of-reading-bytes-in-d2
on stackoverflow, because i ran into kind of a problem.
i wanted to read data from a file (or even better from a st
Hi guys,
i started the thread:
http://stackoverflow.com/questions/7202710/fastest-way-of-reading-bytes-in-d2
on stackoverflow, because i ran into kind of a problem.
i wanted to read data from a file (or even better from a stream, but
lets stay with file), byte-by-byte. the whole thing was p
29 matches
Mail list logo