beagle & soc07 02 Jul 2007 06:07 pm
Mork in numbers
So, I’m not totally done with the Mork implementation yet - but there’s not much left. It’s just some basic things that I’m still unsure about (I’ve actually mailed a guy over at Mozilla about that) and some clean ups. But I still thought I would post some heap-buddy numbers to show the progress. Here’s the heap-buddy output from the old implementation:
Allocated Bytes: 55,6M
Allocated Objects: 943118
GCs: 17
Resizes: 12
Final heap size: 25,3MDistinct Types: 114
Backtraces: 2269
As you can see, these numbers are very bad. Final heap size at 25,3MB isn’t that ideal (the file I’m parsing is 1,2MB in size). There’s also a lot of allocated objects, many more than necessary. This is not strange in any way since the old implementation used strings and regular expressions to work. The new implementation has ditched this concept totally and use only byte arrays. Now, here’s the current heap-buddy output:
Allocated Bytes: 4,8M
Allocated Objects: 150837
GCs: 15
Resizes: 11
Final heap size: 3,0MDistinct Types: 92
Backtraces: 976
The numbers above are more rational than the first ones, but I’m still not 100% satisfied with them. They could be lower. But I can’t whine too much about it, it’s decent since the parser is fully implemented in managed code (=decreasing the speed and adding some memory overhead compared to native code and my code isn’t ideal either). And it’s also much much better than the previous implementation. Maybe I find a way to decrease the memory usage more later on, who knows. I also just want to point out that the numbers displayed here are preliminary and don’t reflect the finished implementation. There might be some variation, but I can’t know that yet.
I haven’t done any scientific speed measurings as of this time, but I do have a Beagle.Util.Stopwatch that gives me an idea of how fast the parser and database is. The old implementation currently take about 0,9 seconds to parse the same file I took the heap-buddy numbers from above. The new implementation needs only about 0,37 seconds, so it’s more than twice as fast. Which is nice.
on 02 Jul 2007 at 11:58 pm 1.Joe Shaw said …
Excellent work Pierre!
I am looking forward to unleashing it on my huge Mork files.
on 15 Sep 2008 at 1:46 am 2.Xanax. said …
Buy xanax online without a prescription….
Order xanax online. Xanax no prescription overnight delivery. Xanax….