ultimatepp/benchmarks/CoDo/CoDo.cpp
mirek-fidler 2d0f19053a
Painter2 (#182)
Painter improvements: Multithreaded rendering improved, new image filter (like Lanczos 3) option, image mapping is now more precise
2023-12-24 15:21:23 +01:00

34 lines
499 B
C++

#include <Core/Core.h>
using namespace Upp;
int m;
std::atomic<int> ii(0);
Function<void ()> x;
Mutex mtx;
CONSOLE_APP_MAIN
{
for(int i = 0; i < 100000; i++) {
RTIMING("CoDo");
CoDo([&] {});
}
for(int i = 0; i < 100000; i++) {
RTIMING("Function");
x = [&] {};
}
for(int i = 0; i < 1000000; i++) {
RTIMING("atomic++");
ii++;
}
for(int i = 0; i < 1000000; i++) {
RTIMING("int++");
m++;
}
for(int i = 0; i < 1000000; i++) {
RTIMING("Mutex");
Mutex::Lock __(mtx);
}
}