Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Algorithm performance comparison question

Algorithm performance comparison question

Scheduled Pinned Locked Moved Algorithms
questionc++javaalgorithmsxml
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nick Alexeev
    wrote on last edited by
    #1

    I’m posting this question after a conversation with one of my friends. There are two algorithms that accomplish the same goal – search through XML file. These algorithms are developed by two different academic research groups. A friend of mine works in one of them, and she wants to compare the performance of the algorithms. The problem is that they are implemented in different languages: C++ and Java. Source codes for both are available. The question is – is there an experimental method for comparing the performance of these algorithms without having both of them implemented in the same language? What assumptions are safe to make? Thanks, - Nick

    S 1 Reply Last reply
    0
    • N Nick Alexeev

      I’m posting this question after a conversation with one of my friends. There are two algorithms that accomplish the same goal – search through XML file. These algorithms are developed by two different academic research groups. A friend of mine works in one of them, and she wants to compare the performance of the algorithms. The problem is that they are implemented in different languages: C++ and Java. Source codes for both are available. The question is – is there an experimental method for comparing the performance of these algorithms without having both of them implemented in the same language? What assumptions are safe to make? Thanks, - Nick

      S Offline
      S Offline
      Skippums
      wrote on last edited by
      #2

      None. Unless the runtimes of the two algorithms are different (say, one is T(n) and the other is T(n*n)), you cannot say which is faster in any language or on any processor with certainty. You will need to either (1) find that the two algorithms have different asymptotic run times, or (2) run benchmarks comparing the two algorithms using different languages, processors, and input data. For the second option, at the end of the day all you can claim is that, "On ___ processor with ___ configuration, and ___ input data, using the ___ compiler (or the ___ runtime engine), the relative runtimes of the two algorithms was ___ and ___". Using this information, you can make certain generalizations with a high level of confidence, but unfortunately asymptotically equivalent algorithms cannot be compared with any level of certainty for all systems, or all compiler optimizations. Good luck,

      Sounds like somebody's got a case of the Mondays -Jeff

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups