From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id CAD097EE4A for ; Tue, 17 Sep 2013 11:32:47 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.126.187; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.126.187; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.126.187 as permitted sender) identity=helo; client-ip=212.227.126.187; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AocBAFshOFLU4367m2dsb2JhbABbgz+DfL1sgRwWDgEBAQEBBgsLCRQogiYBBSMyJBALQgICVwYTCYd+CKhMkhaJP4YCJgeCaYE1A456jzGOag X-IPAS-Result: AocBAFshOFLU4367m2dsb2JhbABbgz+DfL1sgRwWDgEBAQEBBgsLCRQogiYBBSMyJBALQgICVwYTCYd+CKhMkhaJP4YCJgeCaYE1A456jzGOag X-IronPort-AV: E=Sophos;i="4.90,922,1371074400"; d="asc'?scan'208";a="27113141" Received: from moutng.kundenserver.de ([212.227.126.187]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Sep 2013 11:32:44 +0200 Received: from office1.lan.sumadev.de (dslb-088-069-133-176.pools.arcor-ip.net [88.69.133.176]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0Lz0gC-1VzeNo1N2W-014cJS; Tue, 17 Sep 2013 11:32:44 +0200 Received: from [192.168.0.110] (ip-109-90-191-98.unitymediagroup.de [109.90.191.98]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id D6299C00CF; Tue, 17 Sep 2013 11:32:40 +0200 (CEST) Message-ID: <1379410360.10274.156.camel@zotac> From: Gerd Stolpmann To: Yotam Barnoy Cc: Ocaml Mailing List Date: Tue, 17 Sep 2013 11:32:40 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-l9CZ1DDJ8k2atqPoOcA9" X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Provags-ID: V02:K0:EML85o++Zm/SoOS3yrRdANpCO71Ynb3PDa5sHR31pof UActp9eANGVXcM+rkQQHfry9oz4t1+LM5b/jxx2thbn1nIRVc9 kymsXQIodqp5WuTBMk7Qne9nLU97u15fDODfdLF5IM0eqT4+ZK 3Cq99MZWx/avx3UskpZ0/fI9pf+DcyTUxJNCvMsuoM+ivtw4kI FHtP6PTw85BRIpnevkXdZobqTremsM6SdJWecj3cALOr90+Bmg EOy7r9x5Ks9ZDfSEaWPRhS624qtHVOrrksnFvjFppyV5mjmm3o vfQTtJ/FKs17qqkXVCNF5P7WMKGHxSXd4O39S36GZILX34cw9K QCjsquM18d92AR1xcRtukaWlfQUz/0g/W4WYGGqWj Subject: Re: [Caml-list] Expanding the Float Array tag --=-l9CZ1DDJ8k2atqPoOcA9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Montag, den 16.09.2013, 11:26 -0400 schrieb Yotam Barnoy: > Having looked through some of the ocaml runtime's code, I have a > question regarding the Double_array block tag. Why not use a single > tag for all block content that doesn't contain pointers instead? This > would allow optimization of all cases where no pointers are involved, > including float tuples, records with ints, bools and floats etc.=20 >=20 > The only use-case I've seen so far for Double_array tags is for > polymorphic comparison ie. we need the type information to parse > doubles correctly. However, the only default comparison that's valid > on an array of anything is an equality comparison, which is easily > doable without type information. Therefore, I'm confused as to why > this is necessary. You also need the Double_array tags for normal array accesses on 32 bit platforms: If you call a polymorphic function taking an array argument, the function doesn't know whether it is called with a float array or a normal array. Because of this, the compiler generates a dynamic check whether the array is float or something else. For float, every element is 64 bits wide, but for anything else it is 32 bits only. You are right that a special "no-scan" tag would speed up the GC marking phase when there are large arrays profiting from it - for all other no-scan cases except float. Gerd >=20 > Thanks in advance for any answers >=20 > Yotam Barnoy >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-l9CZ1DDJ8k2atqPoOcA9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABAgAGBQJSOCG4AAoJEAaM4b9ZLB5TMSsIAJD/oEj/R1ZjwB7YWdkkcMhj kYM5NeWGtQ6veaCwfpjLAVuu7m8GkDKoMCBSTlN7ICVkpt7ss58uVELE4pbiDVnr G4Gsc4tO3QfB8/f7hfyMfif2mzXQASX7wOLXP8iBaer1P8irlvsbBIVPWGSQe+81 qG0i6k5QNUSFuggIH7rZ7DL7MKEwta3tgV/r/vjkvLMRXPwb0tyH2plgsKFzDCON 3V1y+4Vn8j/o85OGQaTnleLMxIIjzBCrh8aPRkZ2feUNwHkh+ha6mQ2cP27pC6Ld +eStffalCqvb4QLDn9MVQMH5UdNcjg4IufGYN9jTM/414tWaGD3JCo6iPWFPAxk= =lklW -----END PGP SIGNATURE----- --=-l9CZ1DDJ8k2atqPoOcA9--