Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] RE: a regular expression library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-09-25 (21:20)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] calling native from bytecode (was RE: a regular expression library)

>> (The library is much slower when compiled to bytecode though, as it
>>  is entirely written in O'Caml.  I plan to rewrite the critical
>>  sections of the code in C.)
>It would be really nice if there were ways to call OCaml-native code
>from OCaml-byte code. This question has popped up in the past, but it's
>not an easy thing to do due to issues with the runtime:
>Any news in this respect? A toplevel that could run a high-performance,
>OCaml-native code string matching engine would give a terrific scripting

I was going to reply to that same quote and reiterate my desire to link native and bytecode!  :) That was the thread I started you've linked to, here's the beginning:

It's such a shame that we're pushing ocaml code into C because of this limitation.  This seems incredibly ironic and sad to me.

I started looking into it seriously, but I got discouraged after Xavier's discussion of the gc differences and after I looked at the runtime code (lots of #ifdefs and even separate files in some cases).

It seems like it would be a _ton_ of work if you tried to do it in a backwards compatible way.  If this was a higher priority, it seems like you could do it if you punted bytecode backwards compatibility and made some big changes.  I'd love to do this, but it looks like a major undertaking, not the quick hack I originally though it might be.


Bug reports:  FAQ:
To unsubscribe, mail  Archives: