From c204a14def407255d21355cd46e2acb0d9df8ed8 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Sun, 26 Mar 2023 09:34:16 +0530 Subject: [PATCH] Add comment about type-stability Co-authored-by: Anshul Singhvi --- src/bootstrap.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bootstrap.jl b/src/bootstrap.jl index 96e98367..ab8bb0ad 100644 --- a/src/bootstrap.jl +++ b/src/bootstrap.jl @@ -30,6 +30,7 @@ function bootweights(design::SurveyDesign; replicates = 4000, rng = MersenneTwis cluster_sorted = sort(substrata, design.cluster) cluster_sorted_designcluster = cluster_sorted[!, design.cluster] cluster_weights = cluster_sorted[!, design.weights] + # Perform the inner loop in a type-stable function to improve runtime. _bootweights_cluster_sorted!(cluster_sorted, cluster_weights, cluster_sorted_designcluster, replicates, rng) substrata_dfs[h] = cluster_sorted