Re: [xml] xmlXPathNodeSetSort performance
- From: Rob Richards <rrichards cdatazone org>
- To: veillard redhat com
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] xmlXPathNodeSetSort performance
- Date: Mon, 27 Aug 2012 05:06:04 -0400
This broke the win build (VS 2008 and below) as it doesn't contain stdint.h
Outside on windows I don't have a system without stdint.h so can't
completely test this change but assume it should be changes as follows
(for consistency using same WIN32 define from dict.c):
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#elif defined(WIN32)
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#endif
#endif
The windows defs do at least fix the win build
Rob
On 8/24/12 5:02 AM, Daniel Veillard wrote:
On Wed, Jul 25, 2012 at 03:45:44PM +0000, Vojtech Fried wrote:
Second version of Timsort patch, slightly more polished. It builds on
my gcc, I have fixed some warnings and merged the two headers into one. I
did not move the code to .c file though, because the sort implementation
uses some macro magic, i.e. the functions you see in the code are really
function "templates" and they are "instantiated" with the name and type
you choose with the macros (basically it is a poor man's C++ template
system :-). I could remove the macros and specialize the functions for
libxml xmlNodePtr, but that seems quite ugly to me.
Okay, thanks a lot !
Took a bit of time but I have included this in git, with a bit of
cleanup and integration changes like the macros WITH_TIM_SORT in
xpath.c if some people need to quickly switch back or something.
I was a bit worried at first about __builtin_clzll but that should
be okay
http://git.gnome.org/browse/libxml2/commit/?id=3e031b7dae590bdd03084a5971d9f9e66fe5d50b
between that and the XPath optimizations from Nick, this should
really improve XPath performances in 2.9.0 :-)
thanks !
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]