{'fraction_non_alphanumeric': 0.028352490421455937, 'fraction_numerical': 0.0038314176245210726, 'mean_word_length': 5.629441624365482, '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}}
Analyzing Compute Performance Across Languages and Hardware

There are thousands of programming languages in existence, with at least dozens or hundreds of these in common use in a broad range of industries and applications. Different languages offer different strengths and weaknesses along many dimensions that programmers may care about, including safety, performance, portability, developer productivity, and so on. The objective of this project is to explore specific tradeoffs along two dimensions – performance and code complexity – for a few simple but numerically intensive algorithms implemented in several commonly-used programming languages. My experimental results show that while “dynamic” or “scripting” languages like Python appear to offer a moderate advantage in terms of code complexity and readability, “static” or compiled languages like C++ have a clear performance advantage – on the order of 10x for the simple algorithms under consideration here. Converting plain C++ code to Nvidia’s CUDA – a C++ variant specifically designed to interface with Nvidia’s GPU hardware – adds some additional complexity, but the performance benefit varies from minor to massive (~100x), depending on the specific algorithm being run and its adaptability to a massive parallel computing environment.