mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
Painter improvements: Multithreaded rendering improved, new image filter (like Lanczos 3) option, image mapping is now more precise
34 lines
499 B
C++
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);
|
|
}
|
|
}
|