From: Eric Wong <normalperson@yhbt.net>
To: kgio@librelist.com
Subject: Re: Re: [PATCH 3/3] add `#kgio_writev` and `#kgio_trywritev`
Date: Wed, 30 May 2012 20:38:23 +0000 [thread overview]
Message-ID: <20120530203823.GA23189@dcvr.yhbt.net> (raw)
In-Reply-To: CAL-rCA1rnQD-hskO3fB_nBBgcO8ST-3AM3EVS3m2tyLV=bMiTw@mail.gmail.com
Юрий Соколов <funny.falcon@gmail.com> wrote:
> With many tiny strings substitution function from writev_compat.h is faster.
> It seems that we should not always make call to system writev, but do it
> depending on a data shape. I'll try play with tomorrow.
Yes, I expect writev_compat (or even naive write(ary.join)) to be faster
for tiny strings. Each iovec struct is 16-bytes on 64-bit, and this is
a _huge_ overhead on small strings. Setting up pointers/lengths ends up
being more expensive than copying the strings themselves.
I think this optimization is best left to application authors to
decide (and documented as such).
next prev parent reply other threads:[~2012-05-30 20:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 13:56 [PATCH 1/3] Fix UnixClientReadServerWrite test class name Sokolov Yura 'funny-falcon
2012-05-30 13:56 ` [PATCH 2/3] use rb_str_subseq for tail string on write Sokolov Yura 'funny-falcon
2012-05-30 18:57 ` Eric Wong
2012-05-30 19:29 ` Юрий Соколов
2012-05-30 13:56 ` [PATCH 3/3] add `#kgio_writev` and `#kgio_trywritev` Sokolov Yura 'funny-falcon
2012-05-30 19:55 ` Юрий Соколов
2012-05-30 20:38 ` Eric Wong [this message]
2012-05-31 6:16 ` Юрий Соколов
2012-05-31 21:10 ` Eric Wong
2012-05-30 20:39 ` Eric Wong
2012-05-31 6:26 ` Юрий Соколов
2012-05-31 21:14 ` Eric Wong
2012-05-31 21:56 ` Eric Wong
2012-05-31 9:00 ` Sokolov Yura 'funny-falcon
2012-05-31 21:19 ` Eric Wong
2012-06-01 6:14 ` Юрий Соколов
2012-06-01 7:55 ` Eric Wong
2012-06-01 9:42 ` [PATCH] " Sokolov Yura 'funny-falcon
2012-06-01 19:20 ` Eric Wong
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/kgio/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120530203823.GA23189@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=kgio@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/kgio.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).