Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Sun, 16 Mar 2003
Fast Python
Today I read Skip Montanaro's Python Performance Tips. This really helped me get an idea of the things that impact performance in Python programs.

It seems that both the languages that I use regularly, Java and Python have issues with string concatenation. In both languages, the thing that seems to be the obvious way to concatenate strings is also the low performance way. There's so much string handling going on in the world that I just don't understand why strings are so broken this way. Seems like there hasn't been a lot of attention paid to strings, and probably only C++ programmers are aware of Hans J. Boehm's work on Ropes.

I was happy to find that for loops are not as fast as using map, but disappointed because list comprehensions are syntactic sugar for for loops and therefore also slow.

I was also surprised to find out that import statements are executed, although I guess if I had thought about it for a minute I would have realized that. Same for using calls like string.upper.

At least I'm on the way to building a mental model of performance for Python.

[23:34] | [computers/programming/python] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Haystack and Adenine (python + RDF)
It turns out that Haystack is implemented in Adenine, a python like language that knows how to deal with RDF. In fact, it appears that RDF can be used to add metadata to the Adenine bytecodes (I'm not totally clear on this because the document that I read was not quite finished). Adenine also knows how to talk to Java (It's implemented in Java -- so its like an RDF-aware Jython+++). Haystack's UI framework is implemented in Adenine, and appears to use RDF for describing widgets (The framework document is long, and I just paged through it quickly -- I'll sit down for a thorough read later this week).

I'm really curious to see the Haystack developer release when it comes out. Maybe by the end of April we'll see both a Haystack and Chandler developer release.

[22:53] | [computers/open_source/osaf/chandler] | # | TB | F | G | 1 Comments | Other blogs commenting on this post
pyblosxom pingbacks
I've implemented pingbacks for PyBlosxom:

To see it in action, the pingback url for my dev blog is http://64.38.174.108/blog/xmlrpc

The method is called pingback.ping, just as in the pingback spec.

The code is now up at http://www.sauria.com/~twl/code/python/pyblosxom

Look at:
pyblosxom/sendpingback.py to send a pingback
pyblosxom/libs/xmlrpcplugins/pingback.py for the implementation

[00:19] | [computers/internet/weblogs/pyblosxom] | # | TB | F | G | 0 Comments | Other blogs commenting on this post


twl JPG

About

Ted Leung FOAF Explorer

I work at the Open Source Applications Foundation (OSAF).
The opinions expressed here are entirely my own, not those of my employer.

Creative Commons License
This work is licensed under a Creative Commons License.

Now available!
Professional XML Development with Apache Tools : Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Technorati Profile
PGP Key Fingerprint
My del.icio.us Bookmarks
My Flickr Photos


Syndicate
RSS 2.0 xml GIF
Comments (RSS 2.0) xml GIF
Atom 0.3 feed
Feedburner'ed RSS feed

< March 2003 >
SuMoTuWeThFrSa
       1
2 3 4 5 6 7 8
9101112131415
16171819202122
23242526272829
3031     

Archives
2006
2005
2004
2003

Articles
Macintosh Tips and Tricks

Search
Lucene
Blogs nearby
geourl PNG

Categories
/ (1567)
  books/ (33)
  computers/ (62)
    hardware/ (15)
    internet/ (58)
      mail/ (11)
      microcontent/ (58)
      weblogs/ (174)
        pyblosxom/ (36)
      www/ (25)
    open_source/ (145)
      asf/ (53)
      osaf/ (32)
        chandler/ (35)
        cosmo/ (1)
    operating_systems/ (16)
      linux/ (9)
        debian/ (15)
        ubuntu/ (2)
      macosx/ (101)
        tips/ (25)
      windows_xp/ (4)
    programming/ (156)
      clr/ (1)
      dotnet/ (13)
      java/ (71)
        eclipse/ (22)
      lisp/ (34)
      python/ (86)
      smalltalk/ (4)
      xml/ (18)
    research/ (1)
    security/ (4)
    wireless/ (1)
  culture/ (10)
    film/ (8)
    music/ (6)
  education/ (13)
  family/ (17)
  gadgets/ (24)
  misc/ (47)
  people/ (18)
  photography/ (25)
    pictures/ (12)
  places/ (3)
    us/ (0)
      wa/ (2)
        bainbridge_island/ (17)
        seattle/ (13)
  skating/ (6)
  society/ (20)



[Valid RSS]

del.icio.us linkblog

www.flickr.com

Blogroll

java.blogs
Listed on BlogShares

Locations of visitors to this page
Where are visitors to this page?


pyblosxom GIF