Very fast Python line simplification using either the RDP or Visvalingam-Whyatt algorithm implemented in Rust

Fix paths in benchmark, exclude output

+1
.gitignore
··· 1 + tests/output_*
+9 -9
benchmark_runner.py
··· 17 17 # add the bias 18 18 profile.Profile.bias = calibration 19 19 20 - with open("test/cprofile_rust_cython.py", "rb") as f1: 20 + with open("tests/cprofile_rust_cython.py", "rb") as f1: 21 21 c1 = f1.read() 22 22 23 - with open("test/cprofile_rust_cython_complex.py", "rb") as f2: 23 + with open("tests/cprofile_rust_cython_complex.py", "rb") as f2: 24 24 c2 = f2.read() 25 25 26 - with open("test/cprofile_rust_cython_shapely.py", "rb") as f3: 26 + with open("tests/cprofile_rust_cython_shapely.py", "rb") as f3: 27 27 c3 = f3.read() 28 28 29 - cProfile.run(c1, "test/output_stats_rust_cython") 30 - rust_cython = pstats.Stats("test/output_stats_rust_cython") 29 + cProfile.run(c1, "tests/output_stats_rust_cython") 30 + rust_cython = pstats.Stats("tests/output_stats_rust_cython") 31 31 32 - cProfile.run(c2, "test/output_stats_rust_cython_complex") 33 - rust_cython_c = pstats.Stats("test/output_stats_rust_cython_complex") 32 + cProfile.run(c2, "tests/output_stats_rust_cython_complex") 33 + rust_cython_c = pstats.Stats("tests/output_stats_rust_cython_complex") 34 34 35 - cProfile.run(c3, "test/output_stats_rust_cython_shapely") 36 - shapely = pstats.Stats("test/output_stats_rust_cython_shapely") 35 + cProfile.run(c3, "tests/output_stats_rust_cython_shapely") 36 + shapely = pstats.Stats("tests/output_stats_rust_cython_shapely") 37 37 38 38 print("Rust Cython Benchmarks\n") 39 39 rust_cython.sort_stats("cumulative").print_stats(5)
+1 -1
tests/cprofile_rust_cython.py
··· 4 4 import json 5 5 import numpy as np 6 6 7 - with open("test/coords.json", "r") as f: 7 + with open("tests/coords.json", "r") as f: 8 8 coords = np.array(json.load(f)) 9 9 for x in range(50): 10 10 simplify_coords_vw(coords, 0.0000075)
+1 -1
tests/cprofile_rust_cython_complex.py
··· 10 10 import json 11 11 import numpy as np 12 12 13 - with open("test/coords_complex.json", "r") as f: 13 + with open("tests/coords_complex.json", "r") as f: 14 14 coords = np.array(json.load(f)) 15 15 for x in range(50): 16 16 simplify_coords(coords, 0.01)
+1 -1
tests/cprofile_rust_cython_shapely.py
··· 6 6 import numpy as np 7 7 from shapely.geometry import LineString 8 8 9 - with open("test/coords_complex.json", "r") as f: 9 + with open("tests/coords_complex.json", "r") as f: 10 10 coords = np.array(json.load(f)) 11 11 ls = LineString(coords) 12 12 for x in range(50):
tests/output_stats_rust_cython

This is a binary file and will not be displayed.

tests/output_stats_rust_cython_complex

This is a binary file and will not be displayed.

tests/output_stats_rust_cython_shapely

This is a binary file and will not be displayed.