Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knpwrs/multi-threaded-in-place-quicksort
https://github.com/knpwrs/multi-threaded-in-place-quicksort
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/knpwrs/multi-threaded-in-place-quicksort
- Owner: knpwrs
- License: mit
- Created: 2012-04-06T16:53:13.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2019-07-31T14:38:22.000Z (over 5 years ago)
- Last Synced: 2024-06-11T17:38:16.485Z (8 months ago)
- Language: Java
- Homepage:
- Size: 105 KB
- Stars: 10
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
To compile, you can either use `javac` and do everything manually or you can use the included `buildfile` with [Apache Buildr](http://buildr.apache.org/). Going with Apache Buildr simply run `buildr test` which will automatically run `buildr compile` if needed and then run the unit tests using JUnit 4.
Please note that this implementation targets Java 6 and therefore does *not* use the Fork/Join framework.
This implementation is designed to spawn threads up to a certain threshold and then fall back to recursion in order to avoid the overhead of constant context switching. Here are some sample outputs from the `largeTestSort` method (output will vary since sorted values are different every time):
:::text
Generation time: 887 (10000000 Integer Objects)
Copy time: 7
Java built in implementation: 4115
Multi-threaded quick sort: 1599Generation time: 866 (10000000 Integer Objects)
Copy time: 7
Java built in implementation: 4158
Multi-threaded quick sort: 1491Generation time: 875 (10000000 Integer Objects)
Copy time: 7
Java built in implementation: 4062
Multi-threaded quick sort: 1451