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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:28:14+00:00 2026-05-11T19:28:14+00:00

One of my colleagues told me that implementing interfaces introduces overhead. Is this true?

  • 0

One of my colleagues told me that implementing interfaces introduces overhead. Is this true?

I am not concerned about micro optimizations; I just want to know the deeper details this entails.

  • 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-05-11T19:28:14+00:00Added an answer on May 11, 2026 at 7:28 pm

    couldn’t resist and tested it and it looks like almost no overhead.

    Participants are:

    Interface IFoo    defining a method
    class Foo: IFoo   implements IFoo
    class Bar         implements the same method as Foo, but no interface involved
    

    so i defined

    Foo realfoo = new Foo();
    IFoo ifoo = new Foo();
    Bar bar =  new Bar();
    

    and called the method, which does 20 string concatenations, 10,000,000 times on each variable.

    realfoo:   723 Milliseconds
    ifoo:      732 Milliseconds
    bar:       728 Milliseconds
    

    If the method does nothing, the actual calls stand out a bit more.

      realfoo: 48 Milliseconds
      ifoo: 62 Milliseconds
      bar: 49 Milliseconds
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was having a discussion with one of my colleagues about how defensive your
Myself and some colleagues have just been told that we are all taking the
One of my colleagues and I were trying to understand why symbols are not
I was told by a colleague of mine that Visual Studio allows one to
One of my colleague told me this morning, when he killed supervisord by kill
One of my colleagues told me the other day SQL Server wasn't designed to
When I started with git, one of the most prominent benefits my colleagues told
I heard one of my colleagues saying that Java handles recursion more efficiently than
A question that came to one of my colleagues mind, what is the best
One of my colleagues has totally messed up the contents of a directory in

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.