First Steps Toward Runtime Optimization
The changes I'm working on locally will finally take advantage of the fact that after running for a while, we have a darn good idea what methods are being called. And if we know what methods are being called, those invocations no longer have to be dynamic, provided our assumptions hold (assumptions being things like "we're always calling against Fixnums" or "it's always the core implementation of "+"). Put differently: …
…all hits from this test. You can enable query cache stripping in Percona Server at runtime:
SQL:
mysql> SET global query_cache_strip_comments= 'ON' ;
Query OK, 0 rows affected ( 0 . 00 sec )
Query Hits Misses Hits Misses Stripping No Stripping no comment 1000 1000 1000 1000 random at start 2000 0 0 2000 random at middle 2000 0 0 2000 static at start 2000 0 1000 1000
As you can see, the first loop of the queries …
Flexible Runtime. We recently introduced deployment stacks , which enable choice between multiple runtime environments.
What's Next?
Over the next days, weeks, and months, we will release new features that continue to expand the number of use cases supported by Heroku, whether for startups or large enterprises .
You can be sure that each time we build a feature we will be maniacally focused on simplicity and developer productivity, and will always try …
…works well enough on Android, but since there's no way to generate bytecode at runtime, JRuby code that isn't precompiled must run interpreted forever...and run a bit slower than we'd like because of it. In order for Ruby to be a first-class language for Android development, we must make it possible to precompile Ruby code *completely* and bundle it up with the application. So this evening I spent some time making that possible.
I have some good news, some bad news, …
…Regexs, and most importantly Classes, are all just objects, just data, that you can manipulate at runtime.
Class definitions : These are just expressions that are evaluated at runtime, expressions that have access to the class that is being defined. This allows you to create methods that when called will generate other methods, such as has_many in Rails.
When you put these three features together, you have a metaprogramming environment that I would argue is as powerful as what Lisp macros …
…users pushed for it, and even then we'd really like to avoid different behavior based on the runtime.
IronRuby does not have any support for tail-call optimization. Tail-call optimization is supported by the CLR , but it's not automatic; IronRuby must detect this and correctly emit the opcode for tail-call optimizations, and even then the code needs to fit a specific criteria for the just-in-time compiler to recognize the opcode. However, the CLR's way of …
…users pushed for it, and even then we'd really like to avoid different behavior based on the runtime.
IronRuby does not have any support for tail-call optimization. Tail-call optimization is supported by the CLR , but it's not automatic; IronRuby must detect this and correctly emit the opcode for tail-call optimizations, and even then the code needs to fit a specific criteria for the just-in-time compiler to recognize the opcode. However, the CLR's way of …
The fully-packaged application works fantastically for deployment, enabling a repeatable, reliable development to staging to production workflow. However, the need to explicitly bundle the application after added a new dependency in the very early stages of an application's life cycle feels more like a compile step than a lean mean agile machine.
In Bundler 0.9, we're adding the ability to run your application against gems already on your system, with the same reliability …
…instance of whatever T might be (in the above example, it's YourThriftClassName) by calling the erasure method on man, which gives us back the class of T. Runtime reflection while remaining type safe. Cool. This is the first example I've seen that uses both manifests for genericity and higher-order functions. Not that doing so is particularly difficult, it just doesn't seem to have come up elsewhere.
So! Go forth and deserialize, friends.
…application with an optional model namespace module, and look up the needed model classes in that module at runtime. Dependency injection, "duck typed" polymorphism, etc., can all happen at the module level, and the entire Django framework (and well-written reusable applications that use it) capitalize quite effectively on this capability.
Rails wins
There are two major areas where Rails stomps Django: testing tools and database schema migrations .
Testing…