Just messing around, I'll save anyway. Profiled the multi to linear function being called each time in Update. And moved it to the class constructor but it actually slowed it down. Might be cache related? As it is the difference between computing the value on the fly vs. getting the stored value

This commit is contained in:
2016-01-20 14:23:05 -08:00
parent 7f8673ce60
commit ca6fd8c563
4 changed files with 17 additions and 8 deletions

View File

@@ -4,8 +4,8 @@
class Node {
public:
static const int x_bound = 1000;
static const int y_bound = 1000;
static const int x_bound = 300;
static const int y_bound = 300;
Node(sf::Vector2i position_);
~Node();
@@ -23,5 +23,7 @@ private:
sf::Vector2i position;
int curr_state;
int next_state;
};