#pragma GCC optimize ("-O3") #include #include "Config.h" #include "Board.h" #include "Move.h" #include "Movegen.h" #include "Types.h" void bench() { board_init(); int startTime = micros(); make({0x14, 0x34, P_EMPTY}); make({0x64, 0x54, P_EMPTY}); make({0x34, 0x44, P_EMPTY}); make({0x63, 0x43, P_EMPTY}); make({0x44, 0x53, P_EMPTY}); unmake(); unmake(); unmake(); unmake(); unmake(); int elapsed = micros() - startTime; Serial.print(elapsed); Serial.println(F("microseconds for 5 moves")); panic(F("Bench finished!")); } void setup() { // put your setup code here, to run once: board_init(); Serial.begin(115200); bench(); Serial.println(F("hello")); board_init(); int startTime = micros(); print(); make({0x14, 0x34, P_EMPTY}); print(); make({0x64, 0x54, P_EMPTY}); print(); make({0x34, 0x44, P_EMPTY}); print(); make({0x63, 0x43, P_EMPTY}); print(); make({0x44, 0x53, P_EMPTY}); print(); unmake(); print(); unmake(); print(); unmake(); print(); unmake(); print(); unmake(); print(); int elapsed = micros() - startTime; Serial.print(elapsed); Serial.println(F("microseconds for 5 moves")); } void loop() { // put your main code here, to run repeatedly: }