This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
int scores[10]; | |
void read_scores() { | |
int fd = open("scores.txt", O_RDONLY); | |
read(fd, scores, sizeof(scores)); | |
close(fd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
int scores[10]; | |
void read_scores() { | |
int fd = open("scores.txt", O_RDONLY); | |
read(fd, scores, sizeof(scores)); | |
close(fd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <memory> | |
class Action { | |
public: | |
virtual void trigger() = 0; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================== WITHOUT ======================== | |
CPU: Intel Haswell microarchitecture, speed 3600 MHz (estimated) | |
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000 | |
samples % image name symbol name | |
179563 12.5333 libnvidia-glcore.so.331.113 /usr/lib/nvidia-331/libnvidia-glcore.so.331.113 | |
77814 5.4313 cell-simulation Entity::getId() const | |
70720 4.9362 cell-simulation sf::Shape::updateOutline() | |
51316 3.5818 cell-simulation inList(Entity*, std::vector<Entity*, std::allocator<Entity*> >&) | |
41346 2.8859 cell-simulation (anonymous namespace)::computeNormal(sf::Vector2<float> const&, sf::Vector2<float> const&) | |
37680 2.6300 cell-simulation bool __gnu_cxx::operator!=<Entity**, std::vector<Entity*, std::allocator<Entity*> > >(__gnu_cxx::__normal_iterator<Entity**, std::vector<Entity*, std::allocator<Entity*> > > const&, __gnu_cxx::__normal_iterator<Enti |