Live data from Hacker News

Faster Command Line Tools in D

dlang.org

1–10 of 100 posts

Re: Faster Command Line Tools in D

#4
> (Note: For brevity, error handling is largely omitted from programs shown.)

I found this article interesting but to be honest I hate it when people do this. Usually it is the real-world considerations and error handling that cause the code to cease being an elegant demo and look more like the same stuff everyone else writes.

Re: Faster Command Line Tools in D

#5

I'd be interested in the perspective of someone who has used both GO and Dlang for command line tools. Go is my current tool for this, but D seems like a much nicer, less dogmatic language.

The answer is fairly obvious: dlang is a nicer language, by design. Go isn't meant to be particularly impressive on the language design/innovation front.

Re: Faster Command Line Tools in D

#8
This article is trash. They start with "obvious" python at 12s, run it with pypy instead for 3s, and then rewrite and optimize a D version from 3s to 1s w/o attempting any further optimization of the python version(!?!).

In my opinion omit all of the discussion on python and just talk about "how to optimize a D program" b/c that's what this article is.

Re: Faster Command Line Tools in D

#9

> (Note: For brevity, error handling is largely omitted from programs shown.) I found this article interesting but to be honest I hate it when people do this. Usually it is the real-world considerations and error handling that cause the code to cease being an elegant demo and look more like the same stuff everyone else writes.

Well, the real world code is also linked at the start of the article: https://github.com/eBay/tsv-utils-dlang

Re: Faster Command Line Tools in D

#10
post #3

well, i dont think that there were much doubt that d was faster than python i am thought impressed with how fast pypy did

I wonder how fast you can make the Python version. For example by not producing intermediate lists with .split(delim). This produced a significant speedup in the D version, it should do the same in the Python version.
Post reply on HN