Logan Capaldo
3/11/2006 5:54:00 PM
On Mar 10, 2006, at 8:18 PM, baalbek wrote:
> I have tested two implementations of wxRuby/wxPython applications
> (stock price data displayed as a simple graph, and as candlesticks).
>
> The Python implementation only showed graphs from one company,
> while the Ruby implementation showed graphs from ten compaines.
>
> When I checked the memory usage, I was, quite frankly, stunned:
>
> wxPython: 19 Mb memory usage
> wxRuby: 11 Mb memory usage
>
>
> What on earth is going on here?
>
> The Ruby wx application is ten times larger than the Python wx
> application, but only use 50% of the memory of Python.
>
> Is it somehow a super optimized wxRuby as far as memory goes, or is
> Ruby just more lean with memory resources than Python?
>
> Baalbek
>
Random theory, (which could be tested by looking at the source)
Python maybe grabs bigger chunks of memory from the OS at a time. If
ruby allocates 1024K at a time from the OS and python allocates 2048K
at a time from the OS the python memory would appear larger even if
the invidual python objects were slightly smaller or the same size as
the ruby objects (assuming tha each program creates a similar number
of objects).