KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How are integers and strings compared at a low level? Like whenever we use int a = 11; int b = 12; compare(a,b); //Just an example comparison, not in any particular language. And String a = "11"; String b = "12"; compare(a,b); Now what I am asking is what is the system level difference between these two comparisons?Question is not for any particular language, it's just a generic issue. It is also not regarding the string to integer conversion/comparison or vice-versa. I know that the answers might be different for different platforms and different languages, but as I have no clue about this I am just asking a generic question. And why are integer comparisons always considered faster then string comparisons?
Tags (comma-separated)
Save Edits
Cancel