简体   繁体   中英

What's the point of IPS benchmarking in Ruby?

I've been search for iterations per second benchmark explanation on Google, and Ruby seems to be the only language with a popular library where this concept is utilized. Can someone explain, what is the whole point of IPS benchmarking, in what kind of situation would you find it useful?

In Ruby programming, many common tasks have a wide variety of possible implementations. It is to be expected that the question: "Which is faster?" is going to come up from time to time.

In the spirit of scientific progress, a great answer to this question is to test for ips performance and come to conclusions based on evidence.

As to why this would seem to be a Ruby thing, I cannot say. For myself, I have done performance analysis on code written in every conceivable language. The only thing I could add is that this was easiest to do in Ruby, by far.

The ease of creating benchmarks and running them speaks of the flexibility, efficiency, and ease of use of Ruby and its awesome system of Gems.

Benchmarking is important, but determining the number of runs runs to get a relevant result by hand is time consuming and boring.

The author of this gem is the author of Rubinius, an implementation of Ruby itself. This IPS thing is nothing special, just an automated way of determining an agreeable number of runs (and run them).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM