From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p0LCECvg011242 for ; Fri, 21 Jan 2011 13:14:12 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak0CAN8GOU1QDPKEkGdsb2JhbACkeQEBAQEJCQwHEQMhvlANgmyCVwSQUWw X-IronPort-AV: E=Sophos;i="4.60,358,1291590000"; d="scan'208";a="87657457" Received: from smtp10.smtpout.orange.fr (HELO smtp.smtpout.orange.fr) ([80.12.242.132]) by mail2-smtp-roc.national.inria.fr with ESMTP; 21 Jan 2011 13:14:07 +0100 Received: from alcazar ([81.51.75.235]) by mwinf5d20 with ME id yCE61f00854boMd03CE6Td; Fri, 21 Jan 2011 13:14:07 +0100 Date: Fri, 21 Jan 2011 13:15:04 +0100 From: Maxence Guesdon To: Joel Reymont Cc: caml-list@inria.fr Message-ID: <20110121131504.4cea1125@alcazar> In-Reply-To: <3AED40CA-6D22-40C5-BAC8-D2FE8D9E8611@gmail.com> References: <3AED40CA-6D22-40C5-BAC8-D2FE8D9E8611@gmail.com> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] int_of_char vs Char.code On Fri, 21 Jan 2011 12:10:40 +0000 Joel Reymont 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