Richard Bucker

Benchmark - Hello World - TornadoWeb vs Mojolicious

Posted at — Nov 17, 2011

I was running a simple hello world benchmark. It was meant to be as simple as possible. Mojo clearly wins the LOC comparison but TornadoWeb wins the race. ¬†Mojo produced 20TPS and TW produced 22TPS. I used the basic run commands and I used siege from JoeDogs.Mojo:#!/usr/bin/env perluse Mojolicious::Lite;# Simple delayed renderingget ‘/’ => sub { my $self = shift; $self->render_text(‘3 seconds delayed!');};app->start;TornadoWeb:¬†#!/usr/bin/env pythonimport tornado.ioloopimport tornado.webclass MainHandler(tornado.web.RequestHandler): def get(self): self.write(“Hello, world”)application = tornado.web.Application([ (r"/", MainHandler),])if name == “main": application.listen(8888) tornado.ioloop.IOLoop.instance().start()