Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2005-01-05 10:41:13
Size: 230
Editor: ZoomQuiet
Comment:
Revision 3 as of 2009-12-25 07:09:27
Size: 1554
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
[http://effbot.org/zone/element-index.htm Elements and Element Trees] (effbot.org) 的简要使用 [[http://effbot.org/zone/element-index.htm|Elements and Element Trees]] (effbot.org) 的简要使用
Line 7: Line 7:
[[TableOfContents]]
= 文章大标 =
<<TableOfContents>>
= ElementTree =
= cElementTree =
 * http://effbot.org/zone/celementtree.htm
 * 2005年发布 cElementTree C内核的 ElementTree
 * {{{
effbot.org proudly presents the cElementTree library, a fast and very
efficient implementation of the ElementTree API, for Python 2.1 and
later. On typical documents, it's 15-20 times faster than the Python
version of ElementTree, and uses 2-5 times less memory.
Line 10: Line 18:
The 0.9.2 release is 10-20% faster than 0.8 on my benchmarks, and uses
5-15% less memory.

Here are some benchmark results, using a number of popular XML tool-
kits to parse a 3405k source file on my development machine:

   library memory time
   ------------------------------------------------------------
   minidom (python 2.1) 80000k 6.5s
   minidom (python 2.4) 53000k 1.4s
   ElementTree 1.3 14500k 1.1s
   cElementTree 0.8 5700k 0.058s
   cElementTree 0.9 4900k 0.047s
   ------------------------------------------------------------
   readlines (read as utf-8) 8850k 0.093s
   readlines (read as ascii) 5050k 0.032s
   ------------------------------------------------------------

For more information on this library, including download instructions,
comparisions to other popular XML toolkits, and more, see:
}}}
Line 12: Line 41:
-- ZoomQuiet [[[DateTime(2005-01-05T10:41:14Z)]]] -- ZoomQuiet [<<DateTime(2005-01-05T10:41:14Z)>>]

Elements and Element Trees (effbot.org) 的简要使用

ElementTree

cElementTree

  • http://effbot.org/zone/celementtree.htm

  • 2005年发布 cElementTree C内核的 ElementTree

  • effbot.org proudly presents the cElementTree library, a fast and very
    efficient implementation of the ElementTree API, for Python 2.1 and
    later.  On typical documents, it's 15-20 times faster than the Python
    version of ElementTree, and uses 2-5 times less memory.
    
    The 0.9.2 release is 10-20% faster than 0.8 on my benchmarks, and uses
    5-15% less memory.
    
    Here are some benchmark results, using a number of popular XML tool-
    kits to parse a 3405k source file on my development machine:
    
       library                     memory  time
       ------------------------------------------------------------
       minidom (python 2.1)        80000k  6.5s
       minidom (python 2.4)        53000k  1.4s
       ElementTree 1.3             14500k  1.1s
       cElementTree 0.8             5700k  0.058s
       cElementTree 0.9             4900k  0.047s
       ------------------------------------------------------------
       readlines (read as utf-8)    8850k  0.093s
       readlines (read as ascii)    5050k  0.032s
       ------------------------------------------------------------
    
    For more information on this library, including download instructions,
    comparisions to other popular XML toolkits, and more, see:


-- ZoomQuiet [2005-01-05 10:41:14]

ElementTree (last edited 2009-12-25 07:09:27 by localhost)