Skip to main content

Table 1 The nmrstarlib library performance test against NMR-STAR formatted files using pure Python and Python with C extension and against JSONized NMR-STAR files using the standard Python library json parser and the UltraJSON (ujson) 3rd party library

From: A fast and efficient python library for interfacing with the Biological Magnetic Resonance Data Bank

    NMR-STAR 2.1 NMR-STAR 3.1 JSONized NMR-STAR 2.1 JSONized NMR-STAR 3.1
Number of files 11,270 11,244 11,270 11,244
Total size of files, GB 1.1 1.8 4.6 22.0
Time, sec Pure Python json 326 1,100 30 130
Python with C extension aujson 320 423 27 126
Average reading speed, KB/sec Pure Python json 3,290 1,700 158,549 176,479
Python with C extension aujson 3,351 4,421 176,166 182,082
  1. aWe added support for the ujson library for versions of Python starting with Python 3.6, because the ujson library does not provide methods to keep the dict data structure in order when parsing from JSON files; however, starting with Python 3.6, the dict data structure is ordered by default