From: Maxence Guesdon <maxence.guesdon@inria.fr>
To: Joel Reymont <joelr1@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] int_of_char vs Char.code
Date: Fri, 21 Jan 2011 13:15:04 +0100 [thread overview]
Message-ID: <20110121131504.4cea1125@alcazar> (raw)
In-Reply-To: <3AED40CA-6D22-40C5-BAC8-D2FE8D9E8611@gmail.com>
On Fri, 21 Jan 2011 12:10:40 +0000
Joel Reymont <joelr1@gmail.com> wrote:
> I noticed that cryptokit uses Char.code to convert from char to int.
>
> I also found int_of_char.
>
> Should I prefer one over another for performance reasons?
Both are defined the same way:
external int_of_char : char -> int = "%identity" [pervasives.ml]
external code: char -> int = "%identity" [char.ml]
so you can assume the same performance.
Regards,
Maxence
prev parent reply other threads:[~2011-01-21 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 12:10 Joel Reymont
2011-01-21 12:15 ` Maxence Guesdon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110121131504.4cea1125@alcazar \
--to=maxence.guesdon@inria.fr \
--cc=caml-list@inria.fr \
--cc=joelr1@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox