From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Luis Lavena" Newsgroups: gmane.comp.lang.ruby.mongrel.devel Subject: Re: Pure Ruby HTTP parser Date: Sat, 26 Apr 2008 20:57:23 -0300 Message-ID: <71166b3b0804261657m67e5dbe8ic8249bdb7204c56@mail.gmail.com> References: <3ae7f4480804240438g62ed7190if2a84ff08dd2fe34@mail.gmail.com> Reply-To: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1209254344 1396 80.91.229.12 (26 Apr 2008 23:59:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Apr 2008 23:59:04 +0000 (UTC) To: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Sun Apr 27 01:59:39 2008 Return-path: Envelope-to: gclrmd-mongrel-development@m.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=vDPYam96U7d444dAn29MtyzEbuAy/mqyZJUMVZT44M8=; b=hs5no2qm/1wQ4E2YTruBXUEaxkT7nU042M4i7ZUWHpcSHsajrZDGGTSXLIaFPm9IX42vQPlXbrT9vZGJJiJeu3k6Q0lsmomUxBuY7DfxrI6xioMUOJC1+k+F0jJtoeubULjRU53dsIInFfi1xGsJPhMD6au2pzXDsO/G3lJ/JMk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NDzJVYl1BgxYL/vFfuPBQJ07kPzsLdwLTeuagY0n1dEQzXKnnwdMyjN8sa8hROEc538gIEtukWCiMX6VE6R/ju9X1+03L6RTM1DEVyzhFOOhu/mKczEQBAoB2FXOaiLq/Tv8+8wlExgELKXokE//NC7JaVCcfIVUok47LnDFABg= In-Reply-To: Content-Disposition: inline X-BeenThere: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.mongrel.devel:52 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1JpuIr-0007ks-GK for gclrmd-mongrel-development@m.gmane.org; Sun, 27 Apr 2008 01:59:37 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id E7B801858608; Sat, 26 Apr 2008 19:58:54 -0400 (EDT) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by rubyforge.org (Postfix) with ESMTP id 1A30518585EF for ; Sat, 26 Apr 2008 19:57:45 -0400 (EDT) Received: by wa-out-1112.google.com with SMTP id l24so7268274waf.17 for ; Sat, 26 Apr 2008 16:57:23 -0700 (PDT) Received: by 10.115.92.2 with SMTP id u2mr2519825wal.206.1209254243329; Sat, 26 Apr 2008 16:57:23 -0700 (PDT) Received: by 10.115.75.15 with HTTP; Sat, 26 Apr 2008 16:57:23 -0700 (PDT) List-Post: On Sat, Apr 26, 2008 at 8:33 PM, Tony wrote: > I pushed an updated version here: > > http://git.rubini.us/?p=code;a=blob;f=lib/mongrel/http11_parser.rb.rl;h=60c8f3d2519dc1673ef0b4107d40a9df9eca0662;hb=7d246b17efc0ac37db6c241729f6b0e298f49950 > > It's now confirmed working with Mongrel::HttpServer on Rubinius with a > "Hello, world!" Mongrel::HttpHandler. > > It can be used to generate a goto-driven FSM using Rubinius assembly: > > http://git.rubini.us/?p=code;a=blob;f=lib/mongrel/http11.rb;h=435f643ea105f7adc486dc06ab960392c3dfeab5;hb=7d246b17efc0ac37db6c241729f6b0e298f49950 > > Some performance figures: > > MRI + C extension, parsing 10,000 requests: > 0.150000 0.000000 0.150000 ( 0.152268) > > Rubinius + Rubinius.asm parser, parsing 10,000 requests: > 20.500086 0.000000 20.500086 ( 20.500085) > > So, presently ~135x slower than the C extension on MRI :) > Hey Tony, how that can compare with Rubinius + substend? -- Luis Lavena Multimedia systems - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams