Don't spread your propaganda.
The reason why it's faster is because the delete is optymized into a sse vector operation like Servant explained.
Don't spread your propaganda.
The reason why it's faster is because the delete is optymized into a sse vector operation like Servant explained.
Oh you people.
For anyone who is legitimately confused, have fun researching C++'s comma operator. And yes, the comma operator can be overloaded; that might blow your mind. In fact, I bet with a templated overload of the comma operator, plus an appropriately designed class with an overloaded delete operator to represent a collection of deletable pointers, one could make ApochPiQ's code actual behave exactly as presented. Frightening. Too bad it would lose the 3x performance gain, heh!
If I get annoyed by repetitive typing, I just create functions to make things move along faster .
Very handy in Java were.this.is.very.common(to.see) .
No, it's quite legit. It saves two trips to the heap by sending in three addresses at a time, and heap operations are very expensive!
Awesome! Does it works with HTML with variables? I'm planning to do a hockey MMO with it, might need it down the line.
floor(*caek);
delete caek, this;
I'm pretty sure Gnome3 in it's first versions did. They probably needed that 3x perf increase to churn through all the constantly increasing amounts of memory they were using.
Oh you people.
For anyone who is legitimately confused, have fun researching C++'s comma operator. And yes, the comma operator can be overloaded; that might blow your mind. In fact, I bet with a templated overload of the comma operator, plus an appropriately designed class with an overloaded delete operator to represent a collection of deletable pointers, one could make ApochPiQ's code actual behave exactly as presented. Frightening. Too bad it would lose the 3x performance gain, heh!
This is true. And for a few seconds after reading your post i seriously considered it. Then realized that i can implement it easier and safer through variadic templates!
template <typename T> void d(T *t) { delete t; }
template <typename T, typename... U> void d(T*t, U&... u) { delete t; d(u...); }
d(foo, bar, baz);
Not sure if i feel dirty or not...