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

  • Home
  • SEARCH
  • 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 8832317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:30:04+00:00 2026-06-14T08:30:04+00:00

This is something simply to ease my curiosity, if someone would feel like answering

  • 0

This is something simply to ease my curiosity, if someone would feel like answering it though that would be fantastic.

With if statements, is the time taken to calculate the result affected by the way it’s written?

So what I mean is (if that wasn’t overly clear) would the following two statements take the same amount of time to process?

if 1 < 2 and 3 = 3 then
   //do something
end if

compared to

if 1 < 2 then
    if 3 = 3 then
      //Do something
    end if
end if
  • 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-14T08:30:06+00:00Added an answer on June 14, 2026 at 8:30 am

    If we consider that the compiler will not optimize these two calls, then the second statement will require two branching instructions instead of one. And branching requires some extra work for the CPU because of pipelining. So, technically, the second version will require more work, but it should not matter here.

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

Sidebar

Related Questions

Im certain that this is something simply that Im overlooking but Im too irritated
This seems to be something obvious but I simply can't find info by googling.
I want to load this simple something into my Editor: Write:-repeat,write(hi),nl,fail. So that it
I know this is going to be something simple that I'm just missing somehow,
I'm obviously missing something simply, and know the problem is that it's creating a
I'm sure this is something simple but I've been staring at it for a
I know this is probably something simple but I can't seem to find anything
I am sure this is something really simple, but I am going bonkers trying
This is probably something really simple but for some reason I just can't seem
This is probably something really simple, however I am quite new to PHP, and

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.