Changes between Initial Version and Version 1 of Ticket #28024, comment 3


Ignore:
Timestamp:
Apr 11, 2017, 10:46:35 AM (8 years ago)
Author:
Sergey Fedoseev

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28024, comment 3

    initial v1  
    11[https://github.com/django/django/pull/8300 PR]
     2
     3Here's benchmarks:
     4
     5`python -mtimeit -s "from django.contrib.gis.geos import LineString as LS; ls = LineString([(x, x) for x in range(1000)])" "ls.tuple"`
     642.3 msec => 15.2 msec per loop
     7
     8`python -mtimeit -s "from django.contrib.gis.geos import LineString; ls = LineString((0, 0), (1, 1))" "ls[0]"`
     951.7 usec => 42.4 usec per loop
     10
     11`python -mtimeit -s "from django.contrib.gis.geos import LineString; ls = LineString((0, 0), (1, 1))" "ls[0] = (0, 0)"`
     1262.4 usec => 51.4 usec per loop
Back to Top