Jump to content

consistent program benchmarking cross-language

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Ryzol

Ryzol

    Newbie

  • Members
  • Pip
  • 4 posts
I am solving the same problem concurrently in a few different programming languages and want to know how fast they are and how much memory they use. What's most important is that however execution time and memory use is measured, is that it's the same for each program. They must be measured consistently. This means I can't use BIFs for date/time because I can't guarantee that they are implemented the same in each programming language.

The programs will be run on an Gentoo server running 2 intel Xeon processors. What degree of timing accuracy can be achieved with that type of processor? How is a processors timing accuracy calculated? The programming languages are Python, Java, Erlang, and probably Haskell.

Thanks in advance for any help you can give towards measuring execution time and memory usage for concurrent programs.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
It's hard to say for sure, since I'm not sure of several things including:
1) specifications of data types in each language
2) programming methodologies supported by each language
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Ryzol

Ryzol

    Newbie

  • Members
  • Pip
  • 4 posts

WingedPanther said:

It's hard to say for sure, since I'm not sure of several things including:
1) specifications of data types in each language
2) programming methodologies supported by each language

Okay I have no idea what you mean but I'll take my best guess. As far as I know they support every datatype. I don't know of a datatype that can't be implemented in each of those languages.

Programming methodologies? Erlang is a pure functional language. Python is mult-paradigm, Java is imperative and object oriented.

Regardless how does this matter? Shouldn't I (somehow) have the kernel tell me how much memory and time each program takes?

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
OK, I misunderstood. For time I would just write a launcher app/script that marks the time immediately before it launches one of the implementations, and again after they end.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog