Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 3.27 KB

File metadata and controls

38 lines (33 loc) · 3.27 KB

Swiftense Utility Library

A basic utility Library that is used across the Project and contains a variety of different Algorithms. Was written mostly for educational purposes is not up to industry standards.

List

  • Text Parser (Utils/StringIterator/StringIterator.h)
  • Json Parser (Utils/StringIterator/StringIterator.h)
  • Hashmap Algorithm (Utils/SHashmap.h)
  • Quick Search Tree Algorithm (Utils/SQTree.h) removed due to performance overhead compared to hashmap algorithm
  • Database backend (Utils/SQTree/NMap.h, Utils/SQTree/SQTree.h)
  • Dynamic String Utility (Utils/String/String.h)
  • Number Conversion & Base64 Utility (Utils/String/Convert.h)
  • Vector Utility (Utils/Vector.h)

Json Parser

Performance

Read/Write Performance test on 100K lines of json data

Usage

  • 1.) Create Iterator using itr_loadFromLargeFile Function
  • 2.) Parse Data using itr_getAbstract Function
  • 3.) Modify Data
  • 4.) Dump or Stringify updated Data using itr_dump or itr_stringify Functions

Database Backend

A semi-complete database backend using mmap system call to map a file/device to memory which can be accessed via the nmap memory allocator and allows to create persistent memory pages bound to a file/device. This allows fast implementation of datastructures.

Usage

Use nmap_openStorage, nmap_closeStorage, nmap_openStorageOnDevice in combination with the nmap allocator functions nmap_alloc, nmap_free, nmap_seek, nmap_realloc, nmap_optainDbDir to manage the persistent memory. In the SQTree.h a datastructure, using the system can be found. An Interface for the backend utilizing the performance benefits is not planned, the allocator is used in persistent types of the Swiftense Scripting Language.

Note

The System doesn't keep track of the space remaining on the partition, so if you dont have any left it will just instantly crash with something called "Bus error".

License

This work is licensed under Attribution-NonCommercial-NoDerivatives 4.0 International