title: Comparing performance between ruby and python code
body: <p>I have a memory and CPU intensive problem to solve and I need to benchmark the different solutions in ruby and python on different platforms.</p>
  
  <p>To do the benchmark, I need to measure the time taken and the memory occupied by objects (not the entire program, but a selected list of objects) in both python and ruby.</p>
  
  <p>Please recommend ways to do it, and also let me know if it is possible to do it without using OS specify tools like (Task Manager and ps). Thanks!</p>
  
  <p>Update: Yes, I know that both Python and Ruby are not strong in performance and there are better alternatives like c, c++, Java etc. I am actually more interested in comparing the performance of Python and Ruby. And please no fame-wars.</p>