From: Dmitry Nikiforov Date: 2012-02-03T11:14:09+09:00 Subject: Re: Basic Ruby performance Ryan Davis wrote in post #1043801: > Choosing the right language is a lot less important than choosing the > right algorithm: > > 5461 % time ruby -e 'n = 10**8; p (n + 3*n**2 + 2*n**3)/6' > 333333338333333350000000 > > real 0m0.009s > user 0m0.004s > sys 0m0.004s My code was merely an example of very simple loop. Its purpose was not to calculate something, but run through the loop, and execute multiplication on every iteration. My main area of development is processing of rather large amounts of data (billions of entries, primarily processed by regular expressions, with some statistical analysis on top, and potentially - addition of NLP later). You _have_ to iterate through every entry of the incoming data (which might already be in the database, plain text file, or might be just a "fire hose" of data pouring into the system in real time). While I'd LOVE to have a nice and clean syntax, performance is still number 1 on my list of priorities, therefore I asked if maybe there are ways to improve Ruby performance. -- Posted via http://www.ruby-forum.com/.