2010年02月05日

程序发现bug, 必须在星期一重新调整仓位

2005年06月15日

 I was building a jabber gateway using python and twisted via HTTP protocol, it was able to run after many bug fixes. The memory cost on a dule-cpu machine with 2g memory is resonable (about 8%) when the users number over 300, but unfortunately then the cpu usage rose to 48-90%, that leads to the obvious slowdown of client reactions. I don’t think it is the problem of programing logic. So I decide to use psyco JIT compiler to have a trial.
 I haven’t used the psyco module on python before, so I cannot be certain of its performence. But what is amazing after I have downloaded and intalled it is that the cpu usage ranks down to 1/5-10 of original value.(5-8%). That is a greate performance shift especially when the memory cost doesn’t rise. All the works I took to add psyco in my codes are a few lines as :
try:
    import psyco
    psyco.full()
except ImportError:
    print ‘psyco module not found’
    pass
 
 Psyco is rather a magic works, I think. The java JIT I have met before doesn’t give me such a supprise. I’ll try to study it to learn the principle of Just in time compiler and try to migrate it into other dynamic languages such as ruby.


 

2005年06月07日

  Today I have moved the CAS sytem: Maxima’s interface to my favoriate editor: GNU Emacs, The migration is rather easy, both maxima and emacs are GNU software and use lisp language. I need only copy some .el files into the site-lisp folder under emacs installation folder and setq some init variables in .emacs. then M-x maxima works.
  In my works of logisitic operational research, I need a  good computing platforms for both symbolic computing, formula reduction and numerical computing, it should be easy to extend, rich for expression. Maxima satisfy those criterias well, so it is my choice.
  After I learn how to write lisp extensions and maxima modules , I would like to migrate my RETE expert system into maximaand try to add machine learning functionalities here. this platform will be turned into my major working environment. Hope it make me more productive.