From 2f19e94b0ce78d6ccc9eedbf04b8a3460fd05565 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 29 Apr 2024 21:59:51 +0200 Subject: Sort benchmarks --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..17b7043 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Taming C++ + +Experiments with C++ and comparisons with C. + +## sort-benchmark + +Inspired by [Bert's post](https://berthub.eu/articles/posts/c++-1). + +Sorting an array of integers is a simple task, so C and C++ should perform +similarly, right? Wrong! + +``` +C time for 100000000 numbers: 9.886314s +C++ time for 100000000 numbers: 4.92299s +C++ time for 100000000 numbers (parallel): 0.495435s +``` + +A similar benchmark is provided for sorting an arrays of pairs in a +non-standard way. -- cgit v1.3