Skip to content

Instantly share code, notes, and snippets.

@zeux
Last active November 20, 2018 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeux/2e5e1f62c0d0917176c30867f86e61af to your computer and use it in GitHub Desktop.
Save zeux/2e5e1f62c0d0917176c30867f86e61af to your computer and use it in GitHub Desktop.
Loading ucd.all.grouped.xml with pugixml (https://pugixml.org), with default settings and with PUGIXML_COMPACT
~/pugixml$ cat ucd.cpp
#include "pugixml.hpp"
#include <malloc.h>
int main()
{
pugi::xml_document doc;
doc.load_file("ucd.all.grouped.xml");
malloc_stats();
}
~/pugixml$ ls -la ucd.all.grouped.xml
-rwxrwxrwx 1 zeux zeux 46628294 Nov 17 21:12 ucd.all.grouped.xml
~/pugixml$ c++ ucd.cpp src/pugixml.cpp -Isrc -O2 && ./a.out
Arena 0:
system bytes = 102854656
in use bytes = 102850560
Total (incl. mmap):
system bytes = 149483520
in use bytes = 149479424
max mmap regions = 1
max mmap bytes = 46628864
~/pugixml$ c++ ucd.cpp src/pugixml.cpp -Isrc -O2 -DPUGIXML_COMPACT && ./a.out
Arena 0:
system bytes = 20697088
in use bytes = 20628288
Total (incl. mmap):
system bytes = 67592192
in use bytes = 67523392
max mmap regions = 3
max mmap bytes = 47030272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment