Jon Stewart on Mon, 3 Jan 2005 14:33:35 -0600 (CST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [nimh-dev] formats and execution speed


> Some things to consider:
> 
> 1. The only programs for which execution time of formats matters are scan
> and inc, since they're the only programs which instantiate a format more
> than once.
> 2. I'd like this to execute about twice as fast as it does now.
> 3. 2 may not be possible without some really grotesque optimizations.
> 4. I think that the Python format above is uglier than the same written
> in the mh-format language. (And it isn't quite equivalent, either. E.g.,
> it doesn't display To instead of From for messages you sent.)
> 
> Thoughts?


Well, it seems to me that a 50% reduction in running time is not out of 
the question. Our implementation is by and large naive, and we're talking 
performance of string formatting here, which is notoriously variable. 
Also, you are scanning a relatively small folder. It would be good and 
virtuous to run a set of comparisons a number of times on different sized 
folders so we could do a linear regression. The startup cost from the 
Python interpreter is going to be a large-but-constant hit on performance. 
One obvious (but not especially trivial) way to address that is to fork a 
python instance as a slumbering daemon the first time any command is run; 
then it just does nothing as a background user process until the next 
command is issued -- at which time it's immediately available. But that's 
assuming python is like the JVM; I don't really know, but I suspect that 
the eventual solution would be of a similar nature.

Also, my favorite open-source C++ library, Boost, has a component that you 
can use to write python modules in C++. If we absolutely can't get format 
performance to where we want it, it would be relatively easy to write the 
default implementation in C++ and then call it from python.

I don't think we'll come close to matching nmh's performance, but I am 
nonetheless optimistic about nimh's potential performance. I think it's 
too early to worry.

Also, whatever shit code we write, our performance will always be better 
than Outlook's.


> BTW, have you guys died or something? I know Tom has been busy, what with
> getting engaged and all, but what about you, Jon?


No. I'm not dead; I've just been lazy. Also, on Christmas vacation, which 
would be ideal for spare-time development if I didn't have a S.O. and 
didn't have to travel back to the midwest for family Christmas hoopla. 
Also, my at-home technology time has been spent on configuring Erin's new 
work-supplied iBook, setting up a new printer, and photoshopping some 
"Save the date!" cards.



Jon
-- 
Jon Stewart                                 Advanced Los Angeles C++
stew1@xxxxxxxxxxx                           http://www.alacpp.org
_______________________________________________
nimh-dev mailing list
nimh-dev@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/nimh-dev