{'fraction_non_alphanumeric': 0.010820559062218215, 'fraction_numerical': 0.0036068530207394047, 'mean_word_length': 5.166666666666667, '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}}
An efficient approach for accessing C data structures from JavaScript

We present a novel approach for allowing JavaScript applications to access C data structures without performance overhead or additional boiler plate code.
 Dynamic languages such as JavaScript do not have a fixed memory layout for run-time data nor do they allow low-level memory accesses, which makes interoperability with languages such as C hard.
 Our approach allows JavaScript applications to transparently use C pointers as receivers of object accesses or array accesses, thus the programmer can access C data structures as if they were JavaScript objects. We describe how we modified an existing JavaScript interpreter so that it generates different access operations at run time depending on whether the receiver is a JavaScript object or a C pointer. We evaluated our prototype using benchmarks that measure array access performance. The evaluation of our JavaScript interpreter shows that using C arrays from within JavaScript is on average 27% faster than using regular JavaScript arrays and 19% faster than using Typed Arrays.