Skip to content

Commit cf2fb0f

Browse files
committed
v2.0 #major
1 parent 883c9e7 commit cf2fb0f

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
**Updates:**
88

9-
- 🔥 v1.2 support for reporting in json format (thanks [@cgkantidis](https://github.com/cgkantidis)!)
9+
- 🔥 **v2.0 has been released!**\
10+
🚀 Duplo just got a major speed boost! With new
11+
multithreading support, it now takes full advantage of modern CPUs to scan and
12+
detect duplicates faster than ever ⚡️ (thanks [@cgkantidis](https://github.com/cgkantidis)!)
13+
- v1.2 support for reporting in json format (thanks [@cgkantidis](https://github.com/cgkantidis)!)
1014
- [Performance improvements](#71-performance-measurements): it now takes ~9s to process Quake 2 source! (thanks [@cgkantidis](https://github.com/cgkantidis)!)
1115
- refactored xml/json reports for improved maintainability
1216
- Introducing [duplo-action](https://github.com/dlidstrom/duplo-action) for using Duplo in GitHub Actions!
@@ -231,6 +235,9 @@ for further information.
231235
This was measured on modern hardware anno 2025. It means Duplo is able to
232236
process more than 10 thousand lines of code (or ~30 files) per second.
233237
238+
> Note that this is single-threaded performance. Duplo now supports using
239+
> multiple threads (`-j` option) with an almost linear performance improvement.
240+
234241
## 8. Developing
235242
236243
### 8.1. Unix

src/Main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace {
4848
std::cout << " Duplo " << VERSION << " - duplicate source code block finder\n\n";
4949

5050
std::cout << "\nSYNOPSIS\n";
51-
std::cout << " duplo [OPTIONS] [INTPUT_FILELIST] [OUTPUT_FILE]\n";
51+
std::cout << " duplo [OPTIONS] [INPUT_FILELIST] [OUTPUT_FILE]\n";
5252

5353
std::cout << "\nDESCRIPTION\n";
5454
std::cout << " Duplo is a tool to find duplicated code blocks in large\n";
@@ -61,6 +61,7 @@ namespace {
6161
std::cout << " -mc minimal characters in line (default is " << MIN_CHARS << ")\n";
6262
std::cout << " lines with less characters are ignored\n";
6363
std::cout << " -n only report for first N files\n";
64+
std::cout << " -j number of threads to use (default is 1)\n";
6465
std::cout << " -ip ignore preprocessor directives\n";
6566
std::cout << " -d ignore file pairs with same name\n";
6667
std::cout << " -xml output file in XML\n";
@@ -76,6 +77,7 @@ namespace {
7677
" Daniel Lidstrom ([email protected])",
7778
" Christian M. Ammann ([email protected])",
7879
" Trevor D'Arcy-Evans ([email protected])",
80+
" Christos Gkantidis ([email protected])"
7981
};
8082
std::copy(std::begin(authors), std::end(authors), std::ostream_iterator<const char*>(std::cout, "\n"));
8183
std::cout << "\n";

src/compile_flags.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
include/
55
-I
66
../build/_deps/nlohmann_json-src/single_include/
7+
-I
8+
../build/_deps/thread_pool-src/include/

0 commit comments

Comments
 (0)