Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8998835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:05:27+00:00 2026-06-16T00:05:27+00:00

how greater than/less than works internally how much performance hit will be there if

  • 0

how greater than/less than works internally

how much performance hit will be there if i compare 5 with 100 vs 5 with 2,147,483,647 (Integer.MAX_VALUE)

5 < 100 and 5 < Integer.MAX_VALUE

I am asking this question because in some code rank= Integer.MAX_VALUE is returned when data is not present and we will discard data even if rank is greater than 100, so will there be some considerably improvement if i return 101 instead of Integer.MAX_VALUE. I am getting file of millions of records and i have to do this comparison for every record.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:05:28+00:00Added an answer on June 16, 2026 at 12:05 am

    how much performance hit will be there if i compare 5 with 100 vs 5 with 2,147,483,647

    On all 32- and 64-bit hardware architectures that I am familiar with the two comparisons would take exactly the same amount of time.

    The way to improve performance is by focusing on the number of comparisons that you make (and, more generally, the amount of work your algorithm has to carry out).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can limit an array to values less than or greater than using individual
I need to find out how many times the number greater than or less
How do you add < (less than) or > (greater than) to a summary
If I pass a value greater than 100 as the second argument to BinaryInsertionSort,
Specifying a value greater than, or less than zero for top/bottom/left/right has no effect.
I see a lesser than and greater than side by side in Brightscript. What
How can I get all td elements with 'colspan' greater than 1 in jQuery?
I'm trying to find all Users with an id greater than 200, but I'm
I sent a multi-line data with length greater than 20. I'm sure of this
When I use a select box with a size atribute greater than 1 i.e.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.