On Wednesday, 27 December 2023 at 11:08:26 UTC, Thomas Teixeira
wrote:
Hi, you all !
I've wanted to look at D for the last two years, being a C
fanboy and not fond of C++.
It seemed like a good alternative between some delightful extra
new stuff and keeping C-like experience : performances and
Hi, you all !
I've wanted to look at D for the last two years, being a C fanboy
and not fond of C++.
It seemed like a good alternative between some delightful extra
new stuff and keeping C-like experience : performances and code
style wise.
I wrote my first CLI program this weekend and would
On Thursday, 12 November 2015 at 12:49:55 UTC, Daniel Kozak wrote:
dmd -O -release -inline -boundscheck=off asciitable.d
real0m1.463s
user0m1.453s
sys 0m0.003s
ldc2 -singleobj -release -O3 -boundscheck=off asciitable.d
real0m0.945s
user0m0.940s
sys 0m0.000s
gdc -O3 -
On Thursday, 12 November 2015 at 12:49:55 UTC, Daniel Kozak wrote:
On Thursday, 12 November 2015 at 12:25:08 UTC, Daniel Kozak
wrote:
...
auto res = appender(uninitializedArray!(char[])(total));
res.clear();
...
this is faster for DMD and ldc:
auto res = appender!(string)();
res.
On Thursday, 12 November 2015 at 12:25:08 UTC, Daniel Kozak wrote:
V Thu, 12 Nov 2015 12:13:10 +
perlancar via Digitalmars-d-learn
napsáno:
On Wednesday, 11 November 2015 at 14:20:51 UTC, Rikki
Cattermole wrote:
> I turned it into mostly using large allocations, instead of
> small ones.
V Thu, 12 Nov 2015 12:13:10 +
perlancar via Digitalmars-d-learn
napsáno:
> On Wednesday, 11 November 2015 at 14:20:51 UTC, Rikki Cattermole
> wrote:
> > I turned it into mostly using large allocations, instead of
> > small ones.
> > Although I'd recommend using Appender instead of my custom
On Wednesday, 11 November 2015 at 14:20:51 UTC, Rikki Cattermole
wrote:
I turned it into mostly using large allocations, instead of
small ones.
Although I'd recommend using Appender instead of my custom
functions for this.
Oh and for me, I got it at 2 secs, 513 ms, 397 μs, and 5
hnsecs. Unopt
On Wednesday, 11 November 2015 at 14:26:32 UTC, Andrea Fontana
wrote:
Did you try rdmd -O -noboundscheck -release yourscript.d ?
I just did. It improves speed from 17.127s to 14.831s. Nice, but
nowhere near gdc/ldc level.
You should try using appender!string rather than concatenate
(http://
V Thu, 12 Nov 2015 11:03:38 +
Tobias Pankrath via Digitalmars-d-learn
napsáno:
> > or with ~ operator:
> >
> > import std.stdio;
> >
> > [...]
>
> Did anyone check that the last loop isn't optimized out?
Yes, it is not optimized out
> Could also be improved further if you make the functi
or with ~ operator:
import std.stdio;
[...]
Did anyone check that the last loop isn't optimized out? Could
also be improved further if you make the function take an output
range and reuse one appender for every call, but that might be to
far off the original perl solution.
V Thu, 12 Nov 2015 09:12:32 +
Daniel Kozak via Digitalmars-d-learn
napsáno:
> On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote:
> > Here's my first non-hello-world D program, which is a direct
> > translation from the Perl version. I was trying to get a feel
> > about D's per
On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote:
Here's my first non-hello-world D program, which is a direct
translation from the Perl version. I was trying to get a feel
about D's performance:
...
While I am quite impressed with how easy I was able to write D,
I am not so i
On 12/11/15 3:20 AM, Rikki Cattermole wrote:
On 12/11/15 2:31 AM, perlancar wrote:
Here's my first non-hello-world D program, which is a direct translation
from the Perl version. I was trying to get a feel about D's performance:
---BEGIN asciitable.d---
import std.string;
import std.stdio;
str
On Wednesday, 11 November 2015 at 16:02:07 UTC, H. S. Teoh wrote:
If performance is a problem, my first reaction would be to try
GDC or LDC. While there have been recent improvements in DMD
code generation quality, it still has a ways to go to catch
with GDC/LDC's optimizer.
T
My computer
On Wed, Nov 11, 2015 at 02:26:28PM +, Andrea Fontana via
Digitalmars-d-learn wrote:
> On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote:
> >While I am quite impressed with how easy I was able to write D, I am
> >not so impressed with the performance. Using rdmd (build 20151103),
On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote:
While I am quite impressed with how easy I was able to write D,
I am not so impressed with the performance. Using rdmd (build
20151103), the D program runs in 17.127s while the Perl version
runs in 11.391s (so the D version is qui
On 12/11/15 2:31 AM, perlancar wrote:
Here's my first non-hello-world D program, which is a direct translation
from the Perl version. I was trying to get a feel about D's performance:
---BEGIN asciitable.d---
import std.string;
import std.stdio;
string fmttable(ref string[][] table) {
stri
On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote:
for (int rownum=0; rownum < table.length; rownum++) {
res ~= "|";
for (int colnum=0; colnum < table[rownum].length;
colnum++) {
res ~= leftJustify(table[rownum][colnum],
widths[colnum]);
Here's my first non-hello-world D program, which is a direct
translation from the Perl version. I was trying to get a feel
about D's performance:
---BEGIN asciitable.d---
import std.string;
import std.stdio;
string fmttable(ref string[][] table) {
string res = "";
// column widths
Thanks to all those who kindly replied.
On Thu, May 30, 2013 at 9:57 PM, Regan Heath wrote:
>
> The D standard library is currently statically linked. This will change
> shortly/eventually.
Ah OK -- should have thought of that. So whatever is in libc.so or
libstdc++.so doesn't get counted to th
Shriramana Sharma:
However I am somewhat taken aback to see the file size --
335KiB for a
simple Hello World? The equivalent C/C++ programs compiled with
Clang
without any -O options produce binaries of less than 10K!
On Windows32 DMD produces binaries for small programs that are
often half
On Thu, 30 May 2013 12:13:19 +0100, Shriramana Sharma
wrote:
Hello. I am new to D and come from some intermediate C/C++ plus some
Python programming background. I currently have DMD 2.062 installed on
my Kubuntu Raring 64-bit system.
1. Too big binary output?
OK so I wrote my first Hello Wo
Hello. I am new to D and come from some intermediate C/C++ plus some
Python programming background. I currently have DMD 2.062 installed on
my Kubuntu Raring 64-bit system.
1. Too big binary output?
OK so I wrote my first Hello World program:
#! /usr/bin/rdmd
import std.stdio ;
void main() {
23 matches
Mail list logo