[GHC] #8400: Migrate the RTS to use libuv (or libev, or libevent)
GHC
ghc-devs
Thu Oct 3 00:14:05 UTC 2013
#8400: Migrate the RTS to use libuv (or libev, or libevent)
----------------------------------------------+----------------------------
Reporter: schyler | Owner:
Type: feature request | simonmar
Priority: normal | Status: new
Component: Runtime System | Milestone:
Keywords: | Version:
Architecture: Unknown/Multiple | Operating System:
Difficulty: Project (more than a week) | Unknown/Multiple
Blocked By: | Type of failure:
Related Tickets: 635, 7353 | None/Unknown
| Test Case:
| Blocking:
----------------------------------------------+----------------------------
This is mainly a reference discussion ticket.
libuv (https://github.com/joyent/libuv) is a lightweight library which
allows asynchronous IO across OpenBSD, Linux, Darwin, Windows etc by
utilizing the fastest implementation on each system (epoll, kqueue, IOCP,
event ports). These specialized IO polling methods are '''much''' faster
on their respective platforms than just using select() like the RTS
currently does.
Additionally, it also provides cross platform threads, mutex, condition
vars, terminal input/output and term settings w/ cross platform ANSI
escape code handling, thread pools, cross platform HRC's etc. It's
currently significantly faster than libevent and slightly faster than
libev (and no doubt faster than rolling our own stuff). Because it's
maintained and utilized heavily by Node.js it's in extremely active and
maintained development.
Rewriting a portion of the RTS to utilize libuv would have the following
benefits;
* We could ditch basically all of our platform specific code. Everything
under rts/win32 and rts/posix, except the SEH stuff, could be deleted.
* libuv is tuned for speed on each platform. This would be an optimization
to all our async IO stuff.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8400>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list