Discussion Forums

Re: FIX 4.4 coding in Java or c++? which is better?
Changpeng Yu / FT Computer Solutions <>
19 Jun 2008 1:55PM ET

> Hello,
>
> Thanks for responding. I do agree with you. I guess C++ definitely is
> better than java because c++ is more powerful than java(of course, the
> price is memory leak issue if ever occurred).
>
> I actually compare the time of the STL's map and java's hashmap (no multi-
> threading involve in this case as assumption).
>
> It seems to me java is faster than c++ to look for key or insert a new
> key/value for it assume we have 300k line of strings which 40% is
> duplicated(market that collected using bloomberg API in visual c++).
> Please correct me if I am wrong in above testing.
>
> We do pay for the overhead for the garbage collection in java....
>
> Anyway, for now, I am doing something basic OMS thing.... But, maybe in
> future I will need the c++ for system driver.
>
> I will use java native to deal with c++ if i ever reach that point.
>
> I guess C++ definitely is more powerful than java.
>
> Regards, Jason
>
>
> > I am think C++ will have a better performance than Java do. Program
> > written in C++ is much pure than any other languages, one level up
> > from OS, and also gain more benefits from the robusted support
> > standard library (STL) functions. You may get more base functions from
> > java library, if you are not using pure core java. But I think there
> > will be some over heads.
> >
> > I prefer C++ solution, if try to do it on a Unix box.
> >
> > Changpeng Yu FT Computer Solutions
> >
> > http://www.eptop.com/FIX/FixExpress.htm
Jason,

I have not tested what like you did. I just use map so simple to map . In C++, you can define the map as _tags, and add in the map by _tags[11]="CliOrdID". If you want to retrive, then do value = _tags[11]. It is so quick. I just don't know what you try to tested.

I don't use "new" mostly. If you forget to free them up, then there will be a memory leak. But you can be smarter. For example, I define one FIX object in whole FIX handler for Fix inbpund and outgoing message processing. There will no more space waste.

I am think the OS is wrotten by C and C++. C++ is definitly much closer
to the kernel level. You may compile the Java code, and get it optimazed
at most lower level. Now a days, the CPU is much powerful. The application running fast or slow, all determined by the design. The language may not show much difference. I implemented Web based OMS by a separate module. My FIX engine FixExpress is a pure FIX session level support. I choose C++ is I think it will be a small, multi-thread, quick solution. I did not give a second thought.

Good luck,
peng

FT Computer solutions
http://www.eptop.com/FIX/FixExpress.htm


FIX 4.4 coding in Java or c++? which is better?
Jason Chung   27 May 2008 1:10PM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Jason Chung   17 Jun 2008 8:56AM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Alexandre Efremov / javasmith   17 Jun 2008 9:44AM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Jason Chung   18 Jun 2008 8:54AM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Changpeng Yu / FT Computer Solutions   18 Jun 2008 4:49PM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Jason Chung   19 Jun 2008 9:26AM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Changpeng Yu / FT Computer Solutions   19 Jun 2008 1:55PM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Jason Chung   20 Jun 2008 12:57PM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Greg Orsini / Cameron Systems   20 Jun 2008 3:32PM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Serg Gulko   11 Sep 2008 1:24PM ET
Re: FIX 4.4 coding in Java or c++? which is better?
Changpeng Yu / FT Computer Solutions   19 Jun 2008 2:04PM ET