@@ -77,8 +77,8 @@ test_that(
7777 " apply, fixed_lapply and hash_id are identical when rows of each column have the same width" , {
7878
7979 df <- generate_random_df(100 , equal_length = TRUE )
80- apply_hash_res <- apply(df , 1 , SH $ `..old ` $ hash_id , simplify = TRUE )
81- fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..old ` $ hash_id )
80+ apply_hash_res <- apply(df , 1 , SH $ `..ref ` $ hash_id , simplify = TRUE )
81+ fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..ref ` $ hash_id )
8282 vectorized_hash <- SH $ hash_id(df )
8383 expect_identical(apply_hash_res , fixed_apply_hash_res )
8484 expect_identical(apply_hash_res , vectorized_hash )
@@ -87,7 +87,7 @@ test_that(
8787test_that(
8888 " fixed_lapply and hash_id are identical when rows of each column have different width" , {
8989 df <- generate_random_df(100 , equal_length = FALSE )
90- fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..old ` $ hash_id )
90+ fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..ref ` $ hash_id )
9191 vectorized_hash <- SH $ hash_id(df )
9292 expect_identical(fixed_apply_hash_res , vectorized_hash )
9393})
@@ -96,8 +96,8 @@ test_that(
9696 " apply, fixed_lapply and hash_tracked are identical when rows of each column have the same width" , {
9797
9898 df <- generate_random_df(100 , equal_length = TRUE )
99- apply_hash_res <- apply(df , 1 , SH $ `..old ` $ hash_tracked , simplify = TRUE )
100- fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..old ` $ hash_tracked )
99+ apply_hash_res <- apply(df , 1 , SH $ `..ref ` $ hash_tracked , simplify = TRUE )
100+ fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..ref ` $ hash_tracked )
101101 vectorized_hash <- SH $ hash_tracked(df )
102102 expect_identical(apply_hash_res , fixed_apply_hash_res )
103103 expect_identical(apply_hash_res , vectorized_hash )
@@ -106,20 +106,7 @@ test_that(
106106test_that(
107107 " fixed_lapply and hash_tracked are identical when rows of each column have different width" , {
108108 df <- generate_random_df(100 , equal_length = FALSE )
109- fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..old ` $ hash_tracked )
109+ fixed_apply_hash_res <- fixed_apply_hash(df , SH $ `..ref ` $ hash_tracked )
110110 vectorized_hash <- SH $ hash_tracked(df )
111111 expect_identical(fixed_apply_hash_res , vectorized_hash )
112112})
113-
114- # df <- generate_random_df(10000, equal_length = TRUE)
115- # microbenchmark::microbenchmark(
116- # apply = apply(df, 1, SH$`..old`$hash_id, simplify = TRUE),
117- # fixed_apply = fixed_apply_hash(df, SH$`..old`$hash_id),
118- # vectorized = SH$hash_id(df)
119- # )
120-
121- # microbenchmark::microbenchmark(
122- # apply = apply(df, 1, SH$`..old`$hash_tracked, simplify = TRUE),
123- # fixed_apply = fixed_apply_hash(df, SH$`..old`$hash_tracked),
124- # vectorized = SH$hash_tracked(df)
125- # )
0 commit comments