mmap example?

Jason M Jurkowski ;002;icsg6; jmj8237 at cs.rit.edu
Wed Mar 19 09:18:49 EST 2003


On Tue, 18 Mar 2003, VanL wrote:

> I am trying to work with mmap, but the documentation is a bit terse.
>  Does anyone have an example of using mmap?   Any pitfalls regarding its
> use?
>
> Particularly, is there any reason to use .move() as oppsed to slice
> assignment?  Are they basically the same, under the covers, or is the a
> penalty associated with one or the other?
it appears that slice assignment creates a copy of the data and then
performs a memcpy() on that data.  move() is implemented as a
thin-wrapper of memmove().
use move() to avoid the temporary object creation and extra copy involved
with slice assignment.
>
> Thanks,
>
> VanL
>
>
>
>
>
>




More information about the Python-list mailing list