posix_mq RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: ruby.posix.mq@librelist.com
Subject: Re: Using to_io with Marshall.dump
Date: Fri, 7 Jan 2011 21:25:31 +0100	[thread overview]
Message-ID: <AANLkTimEs7XYx9WGv_ehn8u2ADrxq4sWX+YHJXhzJ0PU@mail.gmail.com> (raw)
In-Reply-To: 20110107184834.GA5824@dcvr.yhbt.net

2011/1/7 Eric Wong <normalperson@yhbt.net>:
>> I expect that the above (Marshal writting to a IO rather than
>> generating a string) should be a bit faster.
>
> Perhaps POSIX_MQ#write can be a standard feature.  Do you have
> benchmark results?

Yes, I've do a loop which writes 40000 times (in blocking fashion) in a mqueue:
a) calling   mqueue << Marshal.dump("qweyqiuwey")
b) calling   Marshal.dump("qweyqiuwey", mqueue)

No difference at all. In factm b) is a bit slower sometimes.





-- 
Iñaki Baz Castillo
<ibc@aliax.net>

      parent reply	other threads:[~2011-01-07 20:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 13:39 Using to_io with Marshall.dump Iñaki Baz Castillo
2011-01-07 17:25 ` Eric Wong
2011-01-07 18:25   ` Iñaki Baz Castillo
2011-01-07 18:48     ` Eric Wong
2011-01-07 18:52       ` Eric Wong
2011-01-07 20:29         ` Iñaki Baz Castillo
2011-01-07 21:35           ` Eric Wong
2011-01-07 20:25       ` Iñaki Baz Castillo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/ruby_posix_mq/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimEs7XYx9WGv_ehn8u2ADrxq4sWX+YHJXhzJ0PU@mail.gmail.com \
    --to=ibc@aliax.net \
    --cc=ruby.posix.mq@librelist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_posix_mq.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).