From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCHv2 0/4] remove most FP from thread.c
Date: Fri, 2 Feb 2018 05:18:33 +0000 [thread overview]
Message-ID: <20180202051837.14192-1-e@80x24.org> (raw)
Floating-point can lead to inaccurate conversions and timeouts,
in turn causing wasted CPU cycles. Use timeval_* functions to
perform fixed-point arithmetic, instead. This even results in
a small code reduction.
The following changes since commit 7fdb4099cd6889d29fb07f9b41dbd788d1164031:
array.c: remove rb_ary_frozen_p / Array#frozen? (2018-02-01 09:20:38 +0000)
are available in the Git repository at:
git://80x24.org/ruby.git thread-nofp
for you to fetch changes up to 0b7661ad2e339bf2b95be0ed92d3674870c964d4:
thread.c: avoid FP in C-API time calculations (2018-02-02 05:16:05 +0000)
----------------------------------------------------------------
Eric Wong (4):
thread.c (rb_thread_terminate_all): eliminate double2timeval call
thread.c: extract timeval_sub from timeval_update_expire
thread.c: avoid FP for Thread#join
thread.c: avoid FP in C-API time calculations
thread.c | 188 +++++++++++++++++++++++++++++++--------------------------------
1 file changed, 91 insertions(+), 97 deletions(-)
next reply other threads:[~2018-02-02 5:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 5:18 Eric Wong [this message]
2018-02-02 5:18 ` [PATCH 1/4] thread.c (rb_thread_terminate_all): eliminate double2timeval call Eric Wong
2018-02-02 5:18 ` [PATCH 2/4] thread.c: extract timeval_sub from timeval_update_expire Eric Wong
2018-02-02 5:18 ` [PATCH 3/4] thread.c: avoid FP for Thread#join Eric Wong
2018-02-02 5:18 ` [PATCH 4/4] thread.c: avoid FP in C-API time calculations 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180202051837.14192-1-e@80x24.org \
--to=e@80x24.org \
--cc=spew@80x24.org \
/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.
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).