Barry SCHWARTZ (Barijo ŜVARC) (chemoelectric) wrote,

Rewriting in ocaml

I’m rewriting my typesetting software in Objective Caml, which can be compiled to fast machine code. For verse like Paradise Lost my software is very fast, but I’m elsewhere working with prose paragraphs and for these the software is slow (by modern standards). I would rather not have to dream up and code compromise speed-ups (like the one TeX uses, in which it first tries to format a paragraph without hyphenation and see if the result is ‘good enough’), and so would rather use a ‘faster’ language. Objective Caml seems to be one of the ‘faster’ compiled languages, I have written a few programs in an earlier version of Caml, and it is reasonably terse. Also the compiler is decently fast.

First I looked up benchmarks of interpreted languages, and, while what I scanned over did not include Unicon, it did include Icon as such (which would include Unicon code not using classes and objects), and it was one of the ‘faster’ languages, seeming a bit ‘faster’ than Python, and much faster than current implementations of Ruby. Lua seemed a bit ‘faster’ than Icon; I gathered that its internals are based on the internals of modern Icon, and probably represent an improvement. In any case, it didn’t look as if I could get any dramatic improvements by switching to another interpreted language.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded