aviral739/SAGE ? reverse-engineered prompt

Reverse engineered prompt

Build me a C++20 command line project called SAGE that benchmarks different ways to search a huge unsorted in memory list of integers.

I want it to generate a large synthetic dataset, run a few search methods like simple linear search, std::find, and a faster parallel search that uses the machine’s available CPU cores safely. It should detect the hardware, choose a sensible number of workers, and stop early as soon as the value is found. If possible, also add a smarter version that splits the data into blocks, uses block min and max metadata to skip blocks that cannot contain the target, and uses AVX2 SIMD when the CPU supports it, with a normal fallback when it does not.

Please include a clean benchmark run from main, correctness checks, and CSV export for results. I’d like it to work with CMake, build on Windows or Linux, and print clear timing output so I can compare the strategies easily. If you need to, look up current docs online for any C++20 or AVX2 details.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab