From 3c76dc650e52cf8a52a139b9dcf0b390328e6ce1 Mon Sep 17 00:00:00 2001 From: Morwenn Date: Sun, 17 Nov 2019 17:06:43 +0100 Subject: [PATCH] Release 1.1.0 --- README.md | 18 +++++++++--------- include/gfx/timsort.hpp | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 68814a2..527ca55 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Latest Release](https://img.shields.io/badge/release-cpp--TimSort%2F1.0.0-blue.svg)](https://github.com/timsort/cpp-TimSort/releases) +[![Latest Release](https://img.shields.io/badge/release-cpp--TimSort%2F1.1.0-blue.svg)](https://github.com/timsort/cpp-TimSort/releases) [![Build Status](https://travis-ci.org/timsort/cpp-TimSort.svg?branch=master)](https://travis-ci.org/timsort/cpp-TimSort) [![License](https://img.shields.io/:license-mit-blue.svg)](https://doge.mit-license.org) @@ -10,17 +10,17 @@ See also the following links for a detailed description of TimSort: * http://svn.python.org/projects/python/trunk/Objects/listsort.txt * http://en.wikipedia.org/wiki/Timsort -According to the benchmarks, it is a bit slower than `std::sort()` on randomized sequences, but much faster on -partially-sorted ones. `gfx::timsort` should be usable as a drop-in replacement for `std::stable_sort`, with the -difference that it can't fallback to a O(n logĀ² n) algorithm when there isn't enough extra heap memory available. +According to the benchmarks, it is slower than `std::sort()` on randomized sequences, but faster on partially-sorted +ones. `gfx::timsort` should be usable as a drop-in replacement for `std::stable_sort`, with the difference that it +can't fallback to a O(n logĀ² n) algorithm when there isn't enough extra heap memory available. Additionally `gfx::timsort` can take a [projection function](https://ezoeryou.github.io/blog/article/2019-01-22-ranges-projection.html) -after the comparison function. The support is a bit rougher than in the linked article: only instances of types -callable with parenthesis can be used, there is no support for pointer to members. +after the comparison function. The support is a bit rougher than in the linked article or the C++20 stadard library: +only instances of types callable with parentheses can be used, there is no support for pointer to members. ## EXAMPLE -Example using timsort with a comparison function and a projection function to sort a vector of strings by length: +Example of using timsort with a comparison function and a projection function to sort a vector of strings by length: ```cpp #include @@ -39,7 +39,7 @@ gfx::timsort(vec.begin(), vec.end(), std::less(), &len); ## COMPATIBILITY -This library is compatible with C++98, but if you compile it with C++11 or later it will try to use `std::move()` +This library is compatible with C++98, but if you compile it with C++11 or higher it will try to use `std::move()` when possible instead of copying vaues around, which notably allows to sort collections of move-only types (see [#9](https://github.com/gfx/cpp-TimSort/pull/9) for details). @@ -48,7 +48,7 @@ You can explicity control the use of `std::move()` by setting the macro `GFX_TIM The library has been tested with the following compilers: * GCC 5 * Clang 3.8 -* The Clang version that ships with Xcode 8.3 +* The AppleClang version that ships with Xcode 8.3 * MSVC 2017 update 9 It should also work with more recent compilers, and most likely with some older compilers too. diff --git a/include/gfx/timsort.hpp b/include/gfx/timsort.hpp index 5f3bc58..8af9d44 100644 --- a/include/gfx/timsort.hpp +++ b/include/gfx/timsort.hpp @@ -38,7 +38,7 @@ // Semantic versioning macros #define GFX_TIMSORT_VERSION_MAJOR 1 -#define GFX_TIMSORT_VERSION_MINOR 0 +#define GFX_TIMSORT_VERSION_MINOR 1 #define GFX_TIMSORT_VERSION_PATCH 0 // Diagnostic selection macros