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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:11:36+00:00 2026-06-07T01:11:36+00:00

I have developed a feature extraction algorithm for images. In order to evaluate the

  • 0

I have developed a feature extraction algorithm for images. In order to evaluate the algorithm extraction time, I runned the developed method and its competitors using as input a set of images. All extraction algorithms were implemented in Matlab.

It was pointed out to me, however, that time comparison using Matlab implementations are questionable. Is there any basis for this claim?

  • 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-07T01:11:39+00:00Added an answer on June 7, 2026 at 1:11 am

    The validity of your timings depends on how you have implemented the algorithms and how you they would be used in “the real world”. If you have an application for the algorithms and it will be implemented with Matlab, then there is nothing wrong with your timings because you are timing how the algorithms will be used. However, if you plan to re-code the algorithms in a lower level language, like C++ you might get significantly different results.

    Mathworks has spent a lot of time optimizing the toolbox and basic operations in Matlab, so things like matrix multiply, matrix inverse, FFT, SVD, etc. are often as fast as a good C++ implementation. You do not necessarily know which toolbox routines are optimized. If your algorithm relies only on highly optimized routines and the competing algorithms rely on less optimized routines, your algorithm may appear better simply because the underlying implementation is better.

    The other reason there may be differences is that Matlab is an interpreted language. When your program has a loop, the interpreter has to figure out what the code is doing each time through the loop. In contrast, the matrix operations have been compiled ahead of time to machine code and do not have the interpreter overhead. For example, if I run:

    start = time; 
    x = zeros(1000,1000); 
    x = x+1; 
    stop = time;
    stop - start
    

    On my computer, I get 0.02297 seconds. If I run the equivalent version using a loop:

    start = time; 
    x=zeros(1000,1000); 
    for i = 1:1000
        for j = 1:1000; 
            x(i,j) = x(i,j) + 1; 
        end; 
    end; 
    stop = time;
    stop - start
    

    I get 18.175 seconds. (The method mentioned by @Jonas above gives better timings when you need high precision, but in this case there are enough orders of magnitude difference that this simple method works well enough.)

    If the competing algorithms do a lot of work inside loops, and yours relies more heavily on built-in functions, your algorithm could be beating the competitors simply because it has less interpreter overhead.

    If you plan to use the algorithms only inside Matlab, and interpreter overhead cannot be eliminated from the competitors, it is valid to claim you algorithm is better — at least for Matlab implementations. If you want to claim a more general result, at the very least you have to show that the interpreter is not the reason for performance differences. Implementing all the algorithms in a language like C++ removes the interpreter overhead. To have a fair comparison, you have to make sure you have done a fast implementation of all the underlying algorithms (e.g., FFT, SVD, matrix multiply). Fortunately, optimized libraries are available for a lot of the common algorithms in a number of different languages.

    Of course, if you can show asymptotic complexity of your algorithm is better (O() notation), that would be an indication that it might be better in a wider variety of implementations, though constants turn out to be important in real implementations.

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

Sidebar

Related Questions

I have developed a website using Razor (Microsoft WebMatrix) and now I want to
I have developed a Java server using Eclipse that accepts TCP socket connection from
I have developed a blogger-like archive feature (you know, from the feature module). I
we have developed and Android app, first time, great fun. Now we are giving
I have developed the ipad app which displays images and other product details from
I've developed a JS-heavy site using the Mootools library and have hit a bump
I have developed a simple django application using sqlite3. At first, I wanted to
I have a website developed using Symfony framework by some other developers. I have
feature branches is when each feature is developed in its own branch and only
I've developed a web part using the wspbuilder tool (Web part with feature). When

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.