{'fraction_non_alphanumeric': 0.015584415584415584, 'fraction_numerical': 0.0, 'mean_word_length': 6.009090909090909, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Adaptive flash sorting for memory-constrained embedded devices

Databases running on embedded devices require efficient sorting algorithms for aggregation, joins, and output ordering. Previous research has produced algorithms optimized for small-memory, flash embedded devices that either use multiple read passes to avoid writes or optimize the external merge sort algorithm. Depending on the data input distribution and memory characteristics, neither approach always outperforms the other. This work produces an adaptive flash sorting algorithm that dynamically determines the best sorting approach at run-time. Experimental results demonstrate that the adaptive sorting algorithm combines the best features of both approaches and allows overall superior performance.