>>70 The thing is that I am not using a event library that gives me the possibility of callbacks but I do it myself on top of SDL I will implement something like this looks like http://www.gamedev.net/topic/646358-event-handlers-in-c/ that gives me O(1)