91 karma · joined August 29, 2012
/me ducks
:)
For example, why would there have been confusing over _.each vs. $.each when you have perfectly consistent native support for [].forEach? Nothing against Dart... it's cool and all, but I'm not sure the JavaScript "fragmentation" rationale is all that strong when you have the luxury of only dealing with such modern implementations.
Why would they have? Seems like waiting for ecma approval and specification makes sense.
/nitpick
Lastly, the new class stuff doesn't actually change the inheritance/object models in JavaScript. It's syntactic sugar on top of prototypes, and the "weird constructor stuff" is quite analogous to existing constructor functions. For example, from the [ecmascript wiki](http://wiki.ecmascript.org/doku.php?id=strawman:maximally_mi...): "Class declarations/expressions create a constructor function/prototype pair exactly as for function declarations."
I'm clearly a bit of a fanboi and obviously biased, so take all of this with a grain of salt - but most of these new language features are a good thing. I'm glad to see JavaScript evolving in big ways. It was getting boring watching new editions come out with nothing more interesting than Array.prototype.reduce in them. Especially when you consider server-side contexts like Node.js, stuff like typed arrays, generators, Maps, etc. are welcome additions.
On a related note... any chance we can get confirmation on passwords being hashed/salted?
db.events.ensureIndex({ ts: 1 });
I'll try to clean up my benchmark code a little, throw it in a gist, and then I'll send it your way.* Obligatory unscientific, probably not meaningful, etc. disclaimer.
Mongo Version: 2.2.0-rc1
Hardware: MBP, Snow Leapord, 2.2 GHz Intel Core i7, 8 GB mem
Data: Single collection with 500k records (machine generated time-series event data)
Query Pipeline:
[
{
$match: { ts: { $gte: 1293858000000, $lt: 1296536400000 } }
},
{
$group: {
_id: 'aggregations',
sum: { $sum: '$foo' },
num: { $sum: 1 },
avg: { $avg: '$bar' }
}
}
]
Results: The time range matched against above matches 42,466 documents within the collection. The average response time over 50 runs is 419ms. Not exactly "Big Data OLAP" stuff just yet, but plenty fast enough for most use cases involving reasonably small sets of data. Great job to the MongoDB team!