From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 02BE1BC0A for ; Thu, 5 Apr 2007 19:56:20 +0200 (CEST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.184]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l35HuJ3Z023955 for ; Thu, 5 Apr 2007 19:56:19 +0200 Received: by mu-out-0910.google.com with SMTP id w9so988279mue for ; Thu, 05 Apr 2007 10:56:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=bq+M7fnh24HzqOSZ9wJ/FJ7aLSxyX6OZZs1a0s3VZDcz9fF8IouUejo8E+dNATuaDto9moExo0LuX9qr6NCCzwmBLpWgYx2WVvVEsKXza1GJt9RJkwC9oW86XStF5aFuHC5Yvlnu6tszk1IJaK+8kZ4M07MQLE4m9ByENq6GABI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=c2GUlsEx6gGV8xN3ff5eJ+IeONgV9X6Xr5xE7PM5PeCPYQFSaAaa2kWP2C+22NvXQrzlNv6GjskDqmWtdLqy3jdG3Z7PTJmPuijDhS6CfsBdnLq4w47nHLDvMxw0mv8wSxXdbXUiod3oFrt/Nda0mKjgGdUaWp3W1Tah3/7+//g= Received: by 10.82.138.6 with SMTP id l6mr3070175bud.1175795779128; Thu, 05 Apr 2007 10:56:19 -0700 (PDT) Received: by 10.82.100.16 with HTTP; Thu, 5 Apr 2007 10:56:18 -0700 (PDT) Message-ID: Date: Thu, 5 Apr 2007 19:56:18 +0200 From: Tom To: david.baelde@ens-lyon.org Subject: Re: [Caml-list] Optimizing Array.blit Cc: "OCaml Mailing List" In-Reply-To: <53c655920704041519t77930d38y52003888139b9d2c@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_58658_7175073.1175795778954" References: <53c655920704041519t77930d38y52003888139b9d2c@mail.gmail.com> X-j-chkmail-Score: MSGID : 46153843.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46153843.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; blit:01 memcpy:01 arrays:01 memmove:01 memmove:01 blit:01 chunks:01 memcpy:01 arrays:01 chunks:01 overlap:01 overlap:01 slower:01 slower:01 caml-list:01 X-Attachments: cset="UTF-8" cset="UTF-8" ------=_Part_58658_7175073.1175795778954 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline >>From http://www.cplusplus.com/memcpy: the arrays pointed by both the *destination* and *source* parameters should not overlap (for overlapping memory blocks, memmoveis a safer approach). However, Array.blit allows overlapping of the chunks that are to be copied. So, probably it is slower because it is checking for the overlapping regions and dealing with them appropriately. - Tom ------=_Part_58658_7175073.1175795778954 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline >>From http://www.cplusplus.com/memcpy:
      the arrays pointed by both the destination and source parameters should not overlap (for overlapping memory blocks, memmove is a safer approach).

However, Array.blit allows overlapping of the chunks that are to be copied. So, probably it is slower because it is checking for the overlapping regions and dealing with them appropriately.

- Tom
------=_Part_58658_7175073.1175795778954--