Question : C++ Speed Versus Java

Hi,

I am trying to understand in what circumstances, if any, C++ is significantly faster than java.  I wrote a Java program that used an iterative method to find a solution to a simple game, and then I tried rewriting the program in C++, expecting to see significant speed increases.  However, the speeds were very close, and in fact the Java program was a tad faster.

I can post the code from both programs if anyone needs that info to answer the question, but I just wanted to start by getting general info about the speed differences between the two languages.  I am specifically interested in iterative simulations... specifically, using fictitious play to solve for nash equlibriums.  

Thanks for any thoughts,
Jonah

Answer : C++ Speed Versus Java

what about:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
public void StartTransaction()
        {
            using (var stockMovementCtx = new StockMovementCtxDataContext())
            using (var scope = new TransactionScope())
            {

                var stockMovementItems = from s in stockMovementCtx.spStockMovementForTransaction(TicketID, ItemTypeNo, ItemID, TransactionType,
                                                                                                  FromLocation, ToLocation, Qty, PersonelNo, cuser
                                                                                                  )
                                         select s;

                ReturnCode = s.ReturnCode;
               // MessageBox.Show(stockMovementItems.First().ToString());
                ReturnMsg = s.ReturnMessage;
                TransactionType = s.TransactionType;
                TicketID = s.TicketID;
Random Solutions  
 
programming4us programming4us