Blog Stats
  • Posts - 99
  • Articles - 5
  • Comments - 77
  • Trackbacks - 106

 

Sorting Performance .NET 2.0

Be very careful when using Array.Sort in 2.0. I had posted a bug report about this a while ago http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=62029e14-2d0b-4250-a163-1583034db250

The behavior observed was originally in arraylist (which uses Array.Sort internally) so keep in mind that this applies to it as well.

Array.Sort(Items, 0, Items.Length, Comparer.Default); //takes 1 minute
Array.Sort(Items2, 0, Items.Length, null); //takes 250 ms

Items and Items2 are both clones of the same object []

What is tricky about this code is that the second call does not actually call Array.Sort .. it calls Array<object> .Sort

First call:

IL_0083: ldsfld class [mscorlib]System.Collections.Comparer [mscorlib]System.Collections.Comparer::Default
IL_0088: call void [mscorlib]System.Array::Sort(class [mscorlib]System.Array, int32, int32, class [mscorlib]System.Collections.IComparer)

Second Call:

IL_00c9: ldnull
IL_00ca: call void [mscorlib]System.Array::Sort (!!0[], int32, int32, class [mscorlib]System.Collections.Generic.IComparer`1)

Ah .. :)

Basically what the issue is is that there are 2 distinct sorting algorithms .. one that is Array.Sort one that is Array.Sort .. they do not use the same algorithm. From what I understand some changes were made in how pivots are chosen.


Feedback

# re: Sorting Performance .NET 2.0

Gravatar Interesting find! 5/28/2006 10:29 PM | Aaron Feng

# re: Sorting Performance .NET 2.0

Gravatar Hi dear, i read this good information and find more interest informations for you. thanks. 12/2/2007 2:54 PM | mapquest

# re: Sorting Performance .NET 2.0

Gravatar This blog is novice and informative,it is a pleasure to post a comment on this usefull blog created by a webmaster

Now as such the final stages of the formal completion of nuclear deal has come,so we can expect some positive news effecting the
movement of the INDIAN STOCK MARKET which means stocks coming in power sector will take new direction

Companies which will benefited includes mainly

1.Larsen n Tourbo(LT)
2.Hindustan Construction Co. Ltd(HCC)

and the list had few more names..

Happy Trading

Have Query

Feel free to contact us at


Team
<a href="http://www.knowyourprofit.com"/"title="KnowYourProfit">KnowYourProfit

+91-9871142419 9/30/2008 5:07 AM | KnowYourProfit

# indian stock market tips

Gravatar Hi,
Discipline is the key now if you are a trader or investor in the stock market. As all global markets including Indian stock market have become highly volatile because of which many investors and traders are burning there fingers. Still we suggest there are lot many opportunities which can let you earn a lot from stock market.
We strongly advise everyone not to follow rumors and follow technical analysis.
If you have any doubt, lets share it in this blog and it will help lot many other traders.


Regards
SHARETIPSINFO TEAM


11/12/2008 2:41 AM | sharetipsinfo

# Indian Stock Market Tips by Technical and Fundamental Analysis of NSE/BSE via SMS and Yahoo messenger

Gravatar This blog is nice and informative,good to know that the blog created by the webmaster is very helpfull to the visitors

Now on Saturday i.e 6th Dec'08 RBI has cut Repo rate by 100 BPS to 6.5%, due to this we can see some rebound in the Indian Stock Market,as this is one of the factors which will also decide the movement of Nifty in coming days along with different other factors,our advice for intraday traders is to trade light


Any Query

Call us

+91-9871142419
+91-9212663485


KnowYourProfit 12/23/2008 12:42 AM | KnowYourProfit

# ShareGyan.com - Indian Stock Market Tips, BSE/NSE Share Tips

Gravatar Hi,

Once again after crash Nifty has started going up. Now we suggest all rises should be used as an opportunity to exit old long positions.
This bull run will continue for few more days. Overall market is in bearish mood as in medium term its just a small rally due to short covering
and result season.


Happy Trading,

<a href="http://www.sharegyan.com"title="ShareGyan">ShareGyan 1/7/2009 1:22 AM | sharegyan

# KnowYourProfit - Indian Stock Market Tips Provider

Gravatar This blog is nice and informative,good to know that the blog created by the webmaster is very helpfull to the visitors

RBI has cut Repo rate by 100 BPS to 6.5%, due to this we can see some rebound in the Indian Stock Market,as this is one of the factors which will also decide the movement of Nifty in coming days along with different other factors,our advice for intraday traders is to trade light


Any Query

Call us

+91-9871142419
+91-9212663485

Mail at :-
knowyourprofit@gmail.com
knowyourprofit@yahoo.com

KnowYourProfit 1/17/2009 4:28 AM | KnowYourProfit

# re: Sorting Performance .NET 2.0

Gravatar <p>TradersPlace<br>TradersPlace is gateway to resources for Traders and Investors in Stocks, Futures and Options. TradersPlace is also an 'on-line advisory services' provider for Traders in Indian Stock Market. @ TradersPlace be assured of sound advice & not 'tips' !</p> 3/16/2009 6:35 AM | admin

# INDIAN STOCK MARKET TIPS INFO

Gravatar In the time of recession one job or one work is hardly fulfilling needs of people. So everyone is looking for supplementary source of income.
Now the question is what can be that source of income in such a bad phase of economy??

Well it’s very difficult to start new business at this point of time as it requires lot of cash and efforts. So again question is how to make more money in such conditions when needs are same and income is low?

We strongly suggest that if you like to take bit of risk and don’t want to spend too much money and time on new venture then stock market is the right place for you.
To be very frank this is not the right time for investment that is for long term to medium term investment but every day is a favourable day for day trading. No matter if NSE or BSE
is bullish or bearish as In stock market one can earn in both of these trends.


So just think about it and see if stock market can be the right place to make some extra money.


Please feel free to contact us for any query.


Regards
SHARETIPSINFO TEAM

3/23/2009 3:53 AM | sharetipsinfo

# re: Sorting Performance .NET 2.0

Gravatar Hi,
It’s a well know fact that stock market is affected by elections and now Election 2009 are about to begin in some time so for sure they will also have some sort of impact on Indian stock market.
One can find complete report on Impact of elections on stock market

Apart from Elections another major concern for Indian stock market is Inflation. There was a time when we were concerned about rising inflation but now we are conscious about this falling inflation.

So big question is what should day traders and investors do?

Frankly speaking day traders are least concerned about the market they simply follow trend and make maximum out of it. But yes investors should keep there portfolio light till the elections get over.

Please feel free to contact us for any query.


Regards
www.ShareTipsInfo.com Team

Call at:-

+91-9891655316
+91-9899056796
+91-9891890425

On Yahoo Messenger Chat Id: ShareTipsInfo or ShareTipsInfo_1

On Google Talk Chat Id: ShareTipsInfo1

Mail at:-
contact@sharetipsinfo.com
sharetipsinfo@yahoo.com
sharetipsinfo_1@yahoo.com
sharetipsinfo@gmail.com



4/6/2009 7:14 AM | ShareTipsInfo.com

# Indian Stock Market Tips by Technical and Fundamental Analysis of NSE/BSE via SMS and Yahoo messenger

Gravatar This blog is quite nice and informative, it is our pleasure to post a comment on this usefull blog created by a webmaster

Now as such we all know that in India Elections are just around the corner which would inturn effect the movement of the
Indian Stock Market which means the time has come when a common man should start thinking of investing in the Indian Share Market
which would help him to increase the invested amount because one should not avoid the Opportunities come in Daily Life

We welcome your Quieries at


KnowYourProfit
4/23/2009 1:45 AM | KnowYourProfit

# indian stock market tips

Gravatar Hi,
It’s a well know fact that stock market is affected by elections and now Election 2009 are about to begin in some time so for sure they will also have some sort of impact on Indian stock market.
One can find complete report on Impact of elections on stock market

Apart from Elections another major concern for Indian stock market is Inflation. There was a time when we were concerned about rising inflation but now we are conscious about this falling inflation.

So big question is what should day traders and investors do?

Frankly speaking day traders are least concerned about the market they simply follow trend and make maximum out of it. But yes investors should keep there portfolio light till the elections get over.

Please feel free to contact us for any query.


Regards
SHARETIPSINFO TEAM
4/24/2009 3:37 AM | sharetipsinfo

# re: Sorting Performance .NET 2.0

Gravatar indian stock market leader advisory www.puntercalls.com is now open to retail investor and trader of nse and bse. The finest and accurate stock calls are being offer which was never before in the stock market.
www.puntercalls.com is an innitiative from Punter Groups, India. You may not have experienced this type of great calls before and www.puntercalls.com welcomes you to taste the finest calls of indian share market.
5/28/2009 5:13 AM | www.puntercalls.com

# Indian stock market tips, Share tips

Gravatar Dear Visitors,

This blog is really nice and informative. We are pleased to know this blog is really helping people. It’s our pleasure to post informative content on this useful blog created by webmaster.

As budget season is approaching so it is wise to think before investing as we can witness very volatile market in coming days. Moreover, we are expecting some stock market correction in post budget session


We advise every investor to book profit before budget and try to grab value stocks at further decline for short to medium term.

For any query feel free to contact us.

Regards
SHARETIPSINFO TEAM

+91- 9891655316
+91- 9899056796
+91- 9891890425 6/18/2009 4:43 AM | sharetipsinfo

Post a comment





 

 

 

Copyright © Greg Young