Re: Once and Future FFI



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

.



Relevant Pages

  • Re: Once and Future FFI
    ... My goal here is to interface with the MySql C ... libraries on that platform. ... Unfortunately I am spending my very limited startup cash on data ...
    (comp.lang.scheme)
  • Re: Any Clojure users here?
    ... Each platform has distinct libraries for things like ... But a CL implementation can (and does, in fact, for certain libraries) ... I later want to port it to Windows and give it a native Windows GUI, ...
    (comp.lang.lisp)
  • Re: Any Clojure users here?
    ... Each platform has distinct libraries for things like ... want to port it to Windows and give it a native Windows GUI, ... In neither case do you have painless cross-platform portability. ...
    (comp.lang.lisp)
  • Re: Any Clojure users here?
    ... Again, portability is not all-or-nothing but is a varying degree - so if you use say 1 Java library call every 100 Lisp library calls, portability to another Lisp is probably not going to be a concern. ... Each platform has distinct libraries for things like ... But a CL implementation can (and does, in fact, for certain libraries) hide such details behind a OS-independent API, just like the JVM does... ... want to port it to Windows and give it a native Windows GUI, ...
    (comp.lang.lisp)
  • Re: display array in a frame wnd
    ... I have read some articles on document/view architecture (I began with this ... It takes me on line to create and display datas. ... If it does drawing, it wouldn't even consider creating a window, ... Most libraries I use just require a DC; ...
    (microsoft.public.vc.mfc)