Compare strings or numbers? Which option works faster?

Just have this doubt and I can't find good info on it. 

Which comparison took less time? If I compare strings or numbers (integers or decimals) to order data?

Many thanks.

0
Delavegaz
5/5/2009 1:27:41 AM
asp.net.getting-started 91979 articles. 2 followers. Follow

2 Replies
611 Views

Similar Articles

[PageSpeed] 25

 

Delavegaz:
Which comparison took less time? If I compare strings or numbers (integers or decimals) to order data?

int is Faster because string comparaision is overloaded by Microsoft require
which some checks,
is  you can find the Difference here,

Response.Write(DateTime.Now.ToLongTimeString());
            //String Comparision
Response.Write(DateTime.Now.ToLongTimeString());

Response.Write(DateTime.Now.ToLongTimeString());
            //int Comparision
Response.Write(DateTime.Now.ToLongTimeString());


We All move to our original place.
Don't forget.

Imran Baloch
0
imran_ku07
5/5/2009 3:37:59 AM

 Previous post is right.

You get some info about it from here:http://www.codeproject.com/KB/cs/stringperf.aspx


Ahsan Murshed
__________________________
Please "Mark as Answered" if helpful for you.
ASP BOSS
0
ahsanm
5/5/2009 4:21:17 AM
Reply:

Web resources about - Compare strings or numbers? Which option works faster? - asp.net.getting-started

Number - Wikipedia, the free encyclopedia
A number is a mathematical object used to count , label, and measure . In mathematics , the definition of number has been extended over the years ...

Number - Wikipedia, the free encyclopedia
A number is a mathematical object used to count , label, and measure . In mathematics , the definition of number has been extended over the years ...

No strength in numbers: VCAT rejects test case on objectors legislation
The first test of laws passed by the Andrews government to "give the community a voice" in controversial planning decisions has seen ...

Population snapshot shows ACT boost in number of children
The ACT is losing people to other states, but it's also home to the biggest jump in number of children.

Cattle turned away from Muchea sale due to excessive numbers
Cattle turned away from Muchea sale due to excessive numbers

How HuffPost, Sleep Number Will Use Each Other's Data in Branded-Content Deal
... that touched on the importance of sleep, the agency exec pitched Ms. Huffington on doing a branded-content deal with Horizon client Sleep Number. ...

In Hebron 'even the kids have numbers'
Israeli army introduces a new system of identification numbers for the 30,000 Palestinian residents in the city.

Donald Trump’s supporters hate religious freedom, by the numbers
... were on the issue questions. After asking respondents which candidates they supported, the survey asked them whether they agreed with a number ...

Runkeeper updated with a number of improvements for the Apple Watch
... 3D Touch, requests and snowflakes . Runkeeper - GPS Running, Walk, Cycling, Workout, Pace and Weight Tracker Runkeeper updated with a number ...

Omnibus Increases Number of Unskilled Guest Workers
The Omnibus would increase the number of guest worker visas available to unskilled foreign nationals seeking employment in the U.S.

Resources last updated: 12/18/2015 2:48:28 PM