[IronPython] Speed test
JoeSox
joesox at gmail.com
Wed Apr 19 19:40:56 CEST 2006
On 4/19/06, Dino Viehland <dinov at exchange.microsoft.com> wrote:
> Interop w/ C# shouldn't really cost you that much - it should actually be able to give you speed gains as you fall back into the static world...
>
> Do you know if most of the time is being spent in the XmlTextReader or in IronPython after that?
It just passes an else and and catch. I posted the rough draft of the
test method here if you wish to see in more detail
http://joeswammi.com/projects/InitializeDB.txt
That test method above is a quickly modified version of an another
method that actually passes out a StringCollection. Sorry, I haven't
modified the code to be more reflective of what it is actually doing.
But I believe I have captured the times correctly. And it seems to
successfully create the semantic network of the predicate files within
the PythonEngine.
>And I'm having trouble parsing "but things slow down significantly
when I try to enumerate the StringCollection into a PythonEngine". Is
this just doing a set variable, or are you looping over the collection
and doing a set variable one at a time?
>
Yes, here is a test method I used using unpp()
http://joeswammi.com/projects/load_predicate_files.txt
Ideally, this C# load_predicate_files() method would actually create
the semantic dictionaries instead of passing the StringCollection
nodes to just unpp().
I did try a more static approach...
http://joeswammi.com/projects/load_predicate_files2.txt
But I didn't like the results, could be my own fault though. It was
very slow esp. when it reached around 3000 predicate lines from the
StringCollection.
--
Joseph
More information about the Ironpython-users
mailing list