Well there is a fantastic set of slides entitled: "Why python, ruby, and javascript are slow"
It is right here and you should go read it. but I can sum it up for you by copying a couple of slides
First: here is how you might define a point in C:
struct Point {Ok, thats nifty, lets do that in javascript:
double x;
double y;
double z;
};
var point = {Correct so far, that is pretty much how you'd do that in javascript. But what you are really doing can be best explained by doing a literal translation of the javascript back into C:
'x':x,
'y':y,
'z':z
}
std::hash_set<std::string, double> point;"If you put this in a code review, first your coworkers would laugh alot, and then they'd make mean jokes about you for the next year."
point["x"] = x;
point["y"] = y;
point["z"] = z;
Nobody will laugh at you for doing it in javascript, because that is the best that we've got.
Someone should really fix that.
No comments:
Post a Comment