mirror of https://github.com/CGAL/cgal
at least two extreme points are identical.
for the archive here is the result of the benchmark like done for r69398.
br_spl correspond to the same code but replacing the implementation of
ch_akl_toussaint_assign_points_to_regions_deg by:
for ( ; first != last; ++first )
{
//note that e!=w and s!=n except if the convex hull is a point (they are lexicographically sorted)
if ( left_turn(*e, *w, *first ) )
{
if (s!=w && left_turn( *s, *w, *first ) ) region1.push_back( *first );
else if (e!=s && left_turn( *e, *s, *first ) ) region2.push_back( *first );
}
else
{
if (n!=e && left_turn( *n, *e, *first ) ) region3.push_back( *first );
else if (w!=n && left_turn( *w, *n, *first ) ) region4.push_back( *first );
}
}
The conclusion is that that version is always the fastest.
2 extreme points
using vector
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 1.34 | 2.61 | 16.15 | 16.69 | 18.31 | 20.91 |
|branch | 0.10 | 0.74 | 9.24 | 11.0 | 12.74 | 15.24 |
|br_spl | 0.12 | 0.91 | 10.18 | 11.88 | 13.68 | 15.88 |
|---------------------------------------------------------------
using list
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 1.27 | 2.66 | 16.09 | 16.66 | 18.19 | 21.21 |
|branch | 0.10 | 0.8 | 9.49 | 11.36 | 13.09 | 15.55 |
|br_spl | 0.13 | 0.9 | 10.32 | 12.00 | 13.93 | 16.14 |
--------------------------------------------------------------- |
3 extreme points
using vector
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 1.34 | 2.46 | 14.26 | 14.81 | 16.40 | 18.48 |
|branch | 0.18 | 0.87 | 10.07 | 11.76 | 13.52 | 15.59 |
|br_spl | 0.12 | 0.98 | 10.41 | 12.07 | 13.94 | 15.93 |
|---------------------------------------------------------------|
using list
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 1.32 | 2.45 | 14.17 | 14.76 | 16.62 | 18.61 |
|branch | 0.19 | 0.86 | 10.21 | 12.03 | 13.66 | 15.96 |
|br_spl | 0.16 | 0.94 | 10.74 | 12.38 | 14.39 | 16.31 |
|---------------------------------------------------------------|
Convex hull is 2 points
using vector
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 0.19 | 1.39 | 13.54 | 13.46 | 14.16 | 14.05 |
|branch | 0.11 | 0.54 | 5.02 | 4.96 | 5.09 | 5.06 |
|br_spl | 0.12 | 0.94 | 9.02 | 9.0 | 8.98 | 9.13 |
|---------------------------------------------------------------|
using list
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 0.18 | 1.46 | 13.89 | 13.88 | 14.44 | 14.11 |
|branch | 0.14 | 0.58 | 5.12 | 5.07 | 5.07 | 5.29 |
|br_spl | 0.14 | 0.97 | 9.28 | 9.28 | 9.30 | 9.54 |
|---------------------------------------------------------------|
4 extreme points
using vector
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 2.37 | 2.97 | 9.84 | 8.07 | 7.76 | 9.0 |
|branch | 0.10 | 0.50 | 6.76 | 7.36 | 7.42 | 8.66 |
|br_spl | 0.13 | 0.46 | 6.74 | 7.30 | 7.38 | 8.65 |
|---------------------------------------------------------------|
using list
|nb pts | 10 | 100 | 1000 | 10000 | 100000 | 1000000|
|nb runs | 100001 | 100001 | 100001 | 10001 | 1001 | 101|
|---------------------------------------------------------------|
|next | 2.34 | 3.07 | 9.91 | 8.01 | 7.78 | 9.17 |
|branch | 0.11 | 0.54 | 6.78 | 7.44 | 7.58 | 8.93 |
|br_spl | 0.14 | 0.50 | 6.82 | 7.44 | 7.51 | 8.94 |
|---------------------------------------------------------------|
|
||
|---|---|---|
| .. | ||
| Convex_hull_2 | ||
| IO | ||
| Convex_hull_projective_xy_traits_2.h | ||
| Convex_hull_projective_xz_traits_2.h | ||
| Convex_hull_projective_yz_traits_2.h | ||
| ch_akl_toussaint.h | ||
| ch_bykat.h | ||
| ch_eddy.h | ||
| ch_function_objects_2.h | ||
| ch_graham_andrew.h | ||
| ch_jarvis.h | ||
| ch_melkman.h | ||
| ch_selected_extreme_points_2.h | ||
| convex_hull_2.h | ||
| convex_hull_constructive_traits_2.h | ||
| convex_hull_traits_2.h | ||
| convexity_check_2.h | ||
| segment_intersection_points_2.h | ||