Walter's DConf 2014 Talks - Topics in Finance

Saurabh Das saurabh.das at gmail.com
Sat Mar 22 20:24:07 PDT 2014


On Saturday, 22 March 2014 at 14:04:01 UTC, Daniel Davidson wrote:
> On Saturday, 22 March 2014 at 13:36:01 UTC, Saurabh Das wrote:
>> The edge for D in our case comes from 3 factors -
>>
>> 1. A lot of statistical data from older C++ systems means 
>> better assumptions and decisions in the new D system; and
>>
>
> But, clearly that is not necessarily a benefit of D. It is a 
> benefit of prior experience and the learning curve. If you 
> said, we use our data to not only make better 
> assumptions/decisions, but to do things in D that can not be 
> done in C++ - then you make a very strong case.

Yes - I didn't mean this as a point in favour of D, but just to 
put down the factors that made a difference. However in all 
microbencharks thus far, D has not done worse than C++.

>
>> 2. 20% of the system is latency-critical and 80% is not. D 
>> allows us to quickly finish 80% and really concentrate on the 
>> critical 20%. I must also comment upon how much more 
>> productive it is to write a new system in D as compared with 
>> C++ - gives us more time to think about the actual problem 
>> than try to jump through the C++ hoops.
>>
>
> Productivity is very important and can mean big $$ for most 
> firms. But if latency is the critical factor in an 
> all-or-nothing game, then it is much less so. Maybe your game 
> is different and you have edge beyond low latency. I hope that 
> is the case.
>

To clarify - for us latency is critical. The reason that 
productivity matters is that given resource constraints, I can 
spend much more time optimizing the 20% in D because the 80% can 
be written quickly.

>> 3. A much better type system - some checks can be moved to 
>> compile time. Major benefit.
>>
>
> What is a simple example of something that could be done with D 
> but not C++ that has nothing to do with building things with 
> less developer time?
>
> 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++.

None of the type-system stuff CANNOT be duplicated in C++ (given 
enough resources), but D makes it easy.

I'll give you an example which is similar to XML parsing - 
consider FIX messages. Using templates judiciously, it is 
possible to write a blazing fast FIX message processing system in 
D where a lot of the processing is unrolled at compile time. 
Surely this is possible in C++, but it's going to be a hell of a 
task.

>
> Again, I don't think it is necessary to have any/many cases 
> where D beats C++ hands down in performance for its adoption to 
> widen. But to push D to a wider audience by focusing on areas 
> where the bar is already super high is tough. If I had money to 
> invest in D I would invest it in vibe rather than quant because 
> the relative advantages of D are so much higher.

Yes I agree with that.

>
>> Yes - R, Matlab et all won't be replaced by D most likely. 
>> Let's wait and watch. However I disagree about the 
>> HFT/low-latency side. Ofcourse there's no way to say for sure. 
>> Let's check again in a year :)
>
> Sounds good - keep us posted!
>
> Thanks
> Dan



More information about the Digitalmars-d mailing list