How bad is it to use alloca()?
So, let's say I have some code that's pretty fast. The only problem is, it uses the STL more than it should and dynamic memory so using multiple threads of the same code causes it to be pretty ridiculously slow.
What if I used alloca to handle variable length arrays on the stack because it's so much faster? Is this bad?
I'm probably going to try it anyway (just to try it, because I've never done it and I won't learn anything if I don't) but I'm just curious, is using alloca acceptable? It's just like malloc() but with the much harsher potential to crash your code.
I'm aware that it theoretically can ruin code but we'll see, I like playing with fire.