Walter's DConf 2014 Talks - Topics in Finance

Sean Kelly sean at invisibleduck.org
Sun Mar 23 10:38:15 PDT 2014


On Saturday, 22 March 2014 at 14:04:01 UTC, Daniel Davidson wrote:
>
> For example, I could see technical reasons why in certain 
> non-quant areas like XML parsing where D can be faster than 
> C++. 
> (http://dotnot.org/blog/archives/2008/03/12/why-is-dtango-so-fast-at-parsing-xml/) 
> But then, with a large amount of time and unlimited funding the 
> techniques could probably be duplicated in C++.

Try no funding and a trivial amount of time.  The JSON parser I 
wrote for work in C performs zero allocations and unescaping is 
performed on demand.  D arguably makes this easier by building 
slicing into the language, but not decoding or copying is a 
design decision, not a language artifact (at least in the case of 
C/C++ where aliasing data is allowed).  The take-away from that 
Tango article is that the performance hit for parsing is 
aggressively decoding data the user may not care about or may not 
want decoded in the first place.  This just happens to be the 
approach that basically every XML parser on the planet uses for 
some ridiculous reason.


More information about the Digitalmars-d mailing list