4 ms·
I've always wondered what the speed of Rails would be if ActiveRecord and friends was in C (or ASM for the insane).
by ROFISH 18y ago
I've always wondered what the speed of Rails would be if ActiveRecord and friends was in C (or ASM for the insane).
- jhancock 18y agoWonder no more ;). If you want to see how much better an ORM in ruby/C can be, look at datamapper http://datamapper.org http://datamapper.org. This is mainly used with merb. The new datamapper uses data_objects which has been completely rewritten with C underpinnings to be much more efficient than previous datamapper. I haven't seen any recent benchmarks against ActiveRecord. But I do believe the datamapper team met their goals of being faster.
- dkubb 18y agoDataMapper is about 60% faster overall than ActiveRecord, and as much as 20x faster in a few key benchmarks at the moment: http://is.gd/3xwR http://is.gd/3xwR In fact we, the core DM contributors, have spent very little time optimizing the library. Up until now we've been mostly focused on creating a clean API, and keeping the internals simplified. I would expect the gap to widen much further once the API stabilizes, and the spec coverage gets nearer 100% (it was in the low 90's last I checked).
- ntoshev 18y agoDo you attribute the performance to the implementation language or the different design pattern / approach to ORM?