You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if you are interested in PRs.
I was wondering how D will do http + json.
On my M1 machine LDC is the most popular option (DMD will require Rosetta, GDC probably possible to build, but there is no pre-generated packages).
LDC is LLVM based D backend. And it is providing more optimized code, but it takes more time for compilation, than reference compiler DMD.
So in D world popular flow is: using DMD in developing iteration, and LDC for preparing deployable to production binary.
So on x86 systems DMD should be even faster!
Using DUB for building I have (with /usr/bin/time):
initial build:
0.40 real 0.37 user 0.05 sys
Second build:
0.05 real 0.03 user 0.00 sys
With go build I have (actually the first build took 2s - probably because it was downloading packages):
Initial build:
0.30 real 0.37 user 0.21 sys
Second build:
0.09 real 0.11 user 0.20 sys
importstd.stdio: writeln;
importstd.json: parseJSON;
importstd.net.curl: get;
voidmain()
{
auto luke = get("https://swapi.dev/api/people/1").parseJSON();
writeln(luke["name"].str, " has ", luke["eye_color"].str, " eyes");
}
The text was updated successfully, but these errors were encountered:
Not sure if you are interested in PRs.
I was wondering how D will do http + json.
On my M1 machine LDC is the most popular option (DMD will require Rosetta, GDC probably possible to build, but there is no pre-generated packages).
LDC is LLVM based D backend. And it is providing more optimized code, but it takes more time for compilation, than reference compiler DMD.
So in D world popular flow is: using DMD in developing iteration, and LDC for preparing deployable to production binary.
So on x86 systems DMD should be even faster!
Using DUB for building I have (with /usr/bin/time):
With go build I have (actually the first build took 2s - probably because it was downloading packages):
The text was updated successfully, but these errors were encountered: