loading...

re: Keeping your code clean by sweeping out "if" statements VIEW POST

TOP OF THREAD FULL DISCUSSION
re: So which approach is faster? Did anyone test that? It's just another aspect to look at it, which might be relevant in some cases. I used write asse...
 

A map or associative array of some kind probably makes heap allocations and has plenty of ifs in its internal implementation. So I would hazard a guess it is probably a lot slower than just using ugly ifs.

code of conduct - report abuse