Re: Once and Future FFI
- From: David Rush <kumoyuki@xxxxxxxxx>
- Date: Wed, 25 Jul 2007 22:17:43 -0000
On Jul 21, 1:14 pm, David Rush <kumoy...@xxxxxxxxx> wrote:
I was wondering what the current state of the art is w/rt Scheme FFIs
under u$oft Windows. My goal here is to interface with the MySql C
libraries on that platform.
A follow-up now that I have a settled direction. The short form is
that I am really happy with Larceny's native i386/win (as opposed to
the CLS) FFI. It works really well. With it I have wrapped up the most
immediately relevant bits of the MySQL API and am getting pretty good
performance. This test was a simple scan through through a DB table
with ~180000 rows, formatting each row as an alist and printing it out
to stdout. It was all run under MSYS (Cygwin rxvt & bash), which
appears to have some pathological behavior w/rt console I/O,
particularly that the console I/O speed is heavily dependent on the
dimensions of the window (I had as much as 20% variation due to
resizing). After controlling for window sizes, I got the following
times:
00:15:58.781 - CommonLarceny (.Net) - MySql connector/Net
00:06:23.329 - Direct C# program - MySql connector/Net
00:00:59.344 - Ruby - native C interface from Rails
00:00:49.812 - Larceny (ia32) - FFI to MySQL C API
I should also point out that Larceny/ia32 had a lower CPU utilization
(approx 10% less) than the Ruby version. So it would appear that in
Larceny we now have a native-code compiler that works reliably across
the major platforms *and* supports FFI to the native libraries on
them. This is really groovy! Call me a fan-boy, but the current
Larceny development stream is now firmly back into my position of
preferred Scheme platform.
david rush
--
http://cyber-rush.org/drr -- a very messy construction^Wweb site
.
- References:
- Once and Future FFI
- From: David Rush
- Once and Future FFI
- Prev by Date: Re: Resolution implementation in Scheme?
- Next by Date: newbie question: how to get this tic-tac-toe program run at DrScheme?
- Previous by thread: Re: Once and Future FFI
- Next by thread: Redefintions of functions using "set!"
- Index(es):
Relevant Pages
|