Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement rows case in zip_mut_with using Zip #292

Merged
merged 3 commits into from
Mar 30, 2017
Merged

Reimplement rows case in zip_mut_with using Zip #292

merged 3 commits into from
Mar 30, 2017

Conversation

bluss
Copy link
Member

@bluss bluss commented Mar 30, 2017

  • Reimplement the zip by rows case using Zip.
  • Improves performance of the most important non-contiguous array shape: Where rows are contiguous but we have a greater stride from row to row. This appears if you split a contiguous array into rectangular pieces.

lanes_along/lanes_along_mut are superseded by Inners/InnersMut
These functions will be used in the next version
@bluss
Copy link
Member Author

bluss commented Mar 30, 2017

Ups and downs:

 name                       zipbefore.0 ns/iter  zipafter.0 ns/iter  diff ns/iter   diff % 
 add_1d_regular             450                  447                           -3   -0.67% 
 add_1d_strided             3,215                3,293                         78    2.43% 
 add_2d_0_to_2_iadd_scalar  353                  355                            2    0.57% 
 add_2d_alloc               979                  904                          -75   -7.66% 
 add_2d_assign_ops          467                  445                          -22   -4.71% 
 add_2d_broadcast_0_to_2    357                  353                           -4   -1.12% 
 add_2d_broadcast_1_to_2    641                  542                          -99  -15.44% 
 add_2d_cutout              916                  783                         -133  -14.52% 
 add_2d_cutouts_by_16       2,189                1,626                       -563  -25.72% 
 add_2d_cutouts_by_32       1,303                1,046                       -257  -19.72% 
 add_2d_cutouts_by_4        9,881                6,814                     -3,067  -31.04% 
 add_2d_f32_regular         452                  451                           -1   -0.22% 
 add_2d_regular             452                  443                           -9   -1.99% 
 add_2d_strided             2,155                2,593                        438   20.32% 
 add_2d_strided_dyn         6,696                3,058                     -3,638  -54.33% 
 add_2d_transposed          2,094                2,585                        491   23.45% 
 add_2d_zip                 444                  461                           17    3.83% 
 add_2d_zip_alloc           803                  840                           37    4.61% 
 add_2d_zip_cutout          902                  866                          -36   -3.99% 
 add_2d_zip_strided         2,563                2,578                         15    0.59% 
 add_2d_zip_transposed      2,549                2,587                         38    1.49% 
 assign_scalar_2d_corder    651                  649                           -2   -0.31% 
 assign_scalar_2d_cutout    857                  876                           19    2.22% 
 assign_scalar_2d_forder    653                  650                           -3   -0.46% 
 assign_zero_2d_corder      608                  626                           18    2.96% 
 assign_zero_2d_cutout      895                  875                          -20   -2.23% 
 assign_zero_2d_forder      625                  625                            0    0.00% 
 iadd_2d_regular            353                  355                            2    0.57% 
 iadd_2d_strided            1,568                1,600                         32    2.04% 
 scalar_add_1               745                  741                           -4   -0.54% 
 scalar_add_2               737                  743                            6    0.81% 
 scaled_add_2d_f32_regular  533                  539                            6    1.13% 

@bluss bluss merged commit d9fa235 into master Mar 30, 2017
@bluss bluss deleted the zip-rows branch March 30, 2017 20:54
@bluss bluss mentioned this pull request Apr 1, 2017
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant