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 3636548
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:02:49+00:00 2026-05-19T01:02:49+00:00

My boss just told me that he learned about fast VB6 algorithms from a

  • 0

My boss just told me that he learned about fast VB6 algorithms from a book and that the shortest way to write things is not necessarily the fastest (e.g. builtin methods are sometimes way slower than selfwritten ones because they do all kinds of checking or unicode conversions which might not be necessary in your case).

Now I wonder, is there a website with info on fast different constructs are in various languages, esp. Java/C#/Python/… (also C++ but there are so many compilers which probably differ a lot).

E.g. is there a difference between

if (a()) b();

and

a() && b();

Another example: is a = a * 4 maybe compiled to the same code as a <<= 2?

I could test this myself, of course, writing both then running them 100000 times and comparing the runtime, but I’d also like to learn about new ways to write things, maybe even things that I hadn’t considered before. Thanks for your answers!

  • 1 1 Answer
  • 2 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-05-19T01:02:50+00:00Added an answer on May 19, 2026 at 1:02 am

    is there a difference between if (a()) b(); and a() && b(); ?

    Yes, readability. The first is far more clear about the intent.

    Is a = a * 4 maybe compiled to the same code as a <<= 2 ?

    Most likely yes. But even if they ended up as different CPU instructions the difference in time would be very small, and dependent on the instructions before and after.

    Micro-Optimizing for modern CPU’s is

    • very difficult
    • mostly futile
    • often contrary to what used to be an ‘optimization’ 10+ years ago.

    In conclusion, write readable code first. When you do have a performance problem, profile and measure first.

    As an Application Developer you should worry about using the right algorithms, like not reading a collection more than needed etc. But on the instruction/statement level, there are too many layers (C# Compiler, IL Compiler, Optimizers, pipelined CPU) between you and what actually gets executed.

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

Sidebar

Related Questions

My boss just asked me to write a little test for people that are
I have never programmed in visual basic before and my boss just told me
My boss believes that wizards make things simple for the user. I think they
My boss gave me a bunch of requirements that I'm not pretty sure about
I've just started a new job and one of the things my new boss
i've just downloaded the Yahoo BOSS Mashup framework from http://developer.yahoo.com/search/boss/mashup.html , and I have
My boss has a C++ project that just began hanging today when he hits
Just a question that came up from time to time at my old job
My boss just ignored .vbp files and apparently deleted one of them from the
Just got a request from my boss for an application I'm working on. Basically

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.