ce between C and Assembly is a lot smaller than between C and XQ, and I think 
memory management should not be taken lightly (I'm not saying you do). In OP's 
case, I believe keys could be discarded while memory layout remains intact.


As a general rule of thumb, a lower-level language performs better provided 
that you have the time and skills to write the code efficiently.

And as a general rule of thumb, you don't. 

Even when you are quite convinced that you do.

It's a long time since I wrote in anything as low-level as C or assembler, but 
if you compare XQuery and Java, the level of abstraction of the API for maps is 
very similar, so there is no intrinsic reason to believe one should perform 
better than the other. The main difference is that maps in XQuery are 
immutable, which means you pay a little more for some operations (like adding a 
new entry), and you pay a lot less for other operations (llike bulk copying).

Michael Kay
Saxonica
_______________________________________________
talk@x-query.com
http://x-query.com/mailman/listinfo/talk

Reply via email to