diff options
| author | Tyge Løvset <[email protected]> | 2023-02-12 22:47:55 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-12 23:20:18 +0100 |
| commit | 7dc6fddc079f4f572c8fb7c0ffd5a27e03291a2d (patch) | |
| tree | 681d1894d917bc2fe244375298ea40f736c18e18 /misc/benchmarks/various | |
| parent | 9904a7ea36f9e4f45d7e41e409ed23ad22821e8a (diff) | |
| download | STC-modified-7dc6fddc079f4f572c8fb7c0ffd5a27e03291a2d.tar.gz STC-modified-7dc6fddc079f4f572c8fb7c0ffd5a27e03291a2d.zip | |
Fairly large update before release 4.1, cleaning up docs and some minor additions.
Diffstat (limited to 'misc/benchmarks/various')
| -rw-r--r-- | misc/benchmarks/various/cbits_benchmark.cpp | 123 | ||||
| -rw-r--r-- | misc/benchmarks/various/csort_bench.c | 61 | ||||
| -rw-r--r-- | misc/benchmarks/various/cspan_bench.c | 126 | ||||
| -rw-r--r-- | misc/benchmarks/various/names.txt | 5163 | ||||
| -rw-r--r-- | misc/benchmarks/various/prng_bench.cpp | 223 | ||||
| -rw-r--r-- | misc/benchmarks/various/rust_cmap.c | 61 | ||||
| -rw-r--r-- | misc/benchmarks/various/rust_hashmap.rs | 82 | ||||
| -rw-r--r-- | misc/benchmarks/various/sso_bench.cpp | 135 | ||||
| -rw-r--r-- | misc/benchmarks/various/string_bench_STC.cpp | 300 | ||||
| -rw-r--r-- | misc/benchmarks/various/string_bench_STD.cpp | 371 |
10 files changed, 6645 insertions, 0 deletions
diff --git a/misc/benchmarks/various/cbits_benchmark.cpp b/misc/benchmarks/various/cbits_benchmark.cpp new file mode 100644 index 00000000..dd709db1 --- /dev/null +++ b/misc/benchmarks/various/cbits_benchmark.cpp @@ -0,0 +1,123 @@ +#include <iostream> +#include <bitset> +#include <cstdlib> // rand +#include <ctime> // timer + +enum{ N=1<<22 }; // 4.2 mill. +#define i_static +#include <stc/crandom.h> +#define i_type cbits +#define i_len N +#include <stc/cbits.h> + +inline unsigned long get_time_in_ms() +{ + return (unsigned long)(1000 * clock() / CLOCKS_PER_SEC); +} + + +void one_sec_delay() +{ + unsigned long end_time = get_time_in_ms() + 1000; + + while(get_time_in_ms() < end_time) + { + } +} + + +int main(int argc, char **argv) +{ + size_t seed = time(NULL); + + using namespace std; + bool *bools = new bool[N]; + + unsigned long current_time, difference1, difference2; + uint64_t total; + + one_sec_delay(); + + total = 0; + csrandom(seed); + current_time = get_time_in_ms(); + + c_forrange (40 * N) + { + uint64_t r = crandom(); + bools[r & (N-1)] = r & 1<<29; + } + + difference1 = get_time_in_ms() - current_time; + current_time = get_time_in_ms(); + + c_forrange (100) c_forrange (num, N) + { + total += bools[num]; + } + + delete [] bools; + + difference2 = get_time_in_ms() - current_time; + + cout << "Bool:" << endl << "sum total = " << total << ", random access time = " << difference1 + << ", sequential access time = " << difference2 << endl << endl; + + one_sec_delay(); + + total = 0; + csrandom(seed); + current_time = get_time_in_ms(); + bitset<N> bits; + + c_forrange (40 * N) + { + uint64_t r = crandom(); + bits[r & (N-1)] = r & 1<<29; + } + + difference1 = get_time_in_ms() - current_time; + current_time = get_time_in_ms(); + + c_forrange (100) c_forrange (num, N) + { + total += bits[num]; + } + + difference2 = get_time_in_ms() - current_time; + + cout << "Bitset:" << endl << "sum total = " << total << ", random access time = " << difference1 + << ", sequential access time = " << difference2 << endl << endl; + + one_sec_delay(); + + total = 0; + csrandom(seed); + current_time = get_time_in_ms(); + cbits bits2 = cbits_with_size(N, false); + + c_forrange (40 * N) + { + uint64_t r = crandom(); + cbits_set_value(&bits2, r & (N-1), r & 1<<29); + } + + difference1 = get_time_in_ms() - current_time; + current_time = get_time_in_ms(); + + c_forrange (100) c_forrange (num, N) + { + total += cbits_at(&bits2, num); + } + + cbits_drop(&bits2); + + difference2 = get_time_in_ms() - current_time; + + cout << "cbits:" << endl << "sum total = " << total << ", random access time = " << difference1 + << ", sequential access time = " << difference2 << endl << endl; + + //cin.get(); + + return 0; +} diff --git a/misc/benchmarks/various/csort_bench.c b/misc/benchmarks/various/csort_bench.c new file mode 100644 index 00000000..97885eb8 --- /dev/null +++ b/misc/benchmarks/various/csort_bench.c @@ -0,0 +1,61 @@ +// Generic Quicksort in C, performs as fast as c++ std::sort(). +#include <stdio.h> +#include <time.h> +#include <stdlib.h> +#ifdef __cplusplus + #include <algorithm> +#endif +#define i_val int +#include <stc/algo/csort.h> + +#define ROTL(d,bits) ((d<<(bits)) | (d>>(8*sizeof(d)-(bits)))) +uint64_t random(uint64_t s[3]) { + uint64_t xp = s[0], yp = s[1], zp = s[2]; + s[0] = 15241094284759029579u * zp; + s[1] = yp - xp; s[1] = ROTL(s[1], 12); + s[2] = zp - yp; s[2] = ROTL(s[2], 44); + return xp; +} + +void testsort(int *a, int size, const char *desc) { + clock_t t = clock(); +#ifdef __cplusplus + { printf("std::sort: "); std::sort(a, a + size); } +#else + { printf("stc_sort: "); csort_int(a, size); } +#endif + t = clock() - t; + + printf("time: %.1fms, n: %d, %s\n", + (double)t*1000.0/CLOCKS_PER_SEC, size, desc); +} + + +int main(int argc, char *argv[]) { + size_t i, size = argc > 1 ? strtoull(argv[1], NULL, 0) : 10000000; + uint64_t s[3] = {123456789, 3456789123, 789123456}; + + int32_t *a = (int32_t*)malloc(sizeof(*a) * size); + if (!a) return -1; + + for (i = 0; i < size; i++) + a[i] = random(s) & (1U << 30) - 1; + testsort(a, size, "random"); + for (i = 0; i < 20; i++) + printf(" %d", (int)a[i]); + puts(""); + for (i = 0; i < size; i++) + a[i] = i; + testsort(a, size, "sorted"); + for (i = 0; i < size; i++) + a[i] = size - i; + testsort(a, size, "reverse sorted"); + for (i = 0; i < size; i++) + a[i] = 126735; + testsort(a, size, "constant"); + for (i = 0; i < size; i++) + a[i] = i + 1; + a[size - 1] = 0; + testsort(a, size, "rotated"); + free(a); +} diff --git a/misc/benchmarks/various/cspan_bench.c b/misc/benchmarks/various/cspan_bench.c new file mode 100644 index 00000000..589df13a --- /dev/null +++ b/misc/benchmarks/various/cspan_bench.c @@ -0,0 +1,126 @@ +#define STC_NDEBUG +#include <stc/cspan.h> +#include <stdio.h> +#include <time.h> + +using_cspan3(MD, double); + +// define the dimensions of a 3d-array +enum { + nx = 64, + ny = 64, + nz = 64 +}; +int lx = 15, ly = 10, lz = 5; +int hx = 20, hy = 15, hz = 15; +intptr_t n = 1000000; + +// define the contents of two nx x ny x nz arrays in and out +double Vout[nx * ny * nz]; +double Vin[nx * ny * nz]; //, 1.23; + +// define some slice indices for each dimension + +static void MDRanges_setup(intptr_t state) +{ + double sum = 0; + clock_t t = clock(); + + for (intptr_t s = 0; s < state; ++s) + { + MD3 r_in = cspan_md(Vin, nx, ny, nz); + MD3 r_out = cspan_md(Vout, nx, ny, nz); + + r_in = cspan_slice(MD3, &r_in, {lx, hx}, {ly, hy}, {lz, hz}); + r_out = cspan_slice(MD3, &r_out, {lx, hx}, {ly, hy}, {lz, hz}); + MD3_iter i = MD3_begin(&r_in); // can be iterated "flat". + MD3_iter o = MD3_begin(&r_out); + sum += Vin[s % nx]; + } + t = clock() - t; + printf("setup: %.1f ms, %f\n", 1000.0f * t / CLOCKS_PER_SEC, sum); +} + +static void TraditionalForLoop(intptr_t state) +{ + clock_t t = clock(); + double sum = 0; + + for (int s = 0; s < state; ++s) { + for (int x = lx; x < hx; ++x) { + for (int y = ly; y < hy; ++y) { + for (int z = lz; z < hz; ++z) + { + double d = Vin[nz*(ny*x + y) + z]; + Vout[nz*(ny*x + y) + z] += d; + sum += d; + } + } + } + } + t = clock() - t; + printf("forloop: %.1f ms, %f\n", 1000.0f * t / CLOCKS_PER_SEC, sum); +} + +static void MDRanges_nested_loop(intptr_t state) +{ + MD3 r_in = cspan_md(Vin, nx, ny, nz); + MD3 r_out = cspan_md(Vout, nx, ny, nz); + r_in = cspan_slice(MD3, &r_in, {lx, hx}, {ly, hy}, {lz, hz}); + r_out = cspan_slice(MD3, &r_out, {lx, hx}, {ly, hy}, {lz, hz}); + + // C++23: for (auto [o, i] : std::views::zip(flat(r_out), flat(r_in))) { o = i; } + clock_t t = clock(); + double sum = 0; + + for (intptr_t s = 0; s < state; ++s) { + for (int x = 0; x < r_in.shape[0]; ++x) { + for (int y = 0; y < r_in.shape[1]; ++y) { + for (int z = 0; z < r_in.shape[2]; ++z) + { + double d = *cspan_at(&r_in, x, y, z); + *cspan_at(&r_out, x, y, z) += d; + sum += d; + } + } + } + } + t = clock() - t; + printf("nested: %.1f ms, %f\n", 1000.0f * t / CLOCKS_PER_SEC, sum); +} + +static void MDRanges_loop_over_joined(intptr_t state) +{ + MD3 r_in = cspan_md(Vin, nx, ny, nz); + MD3 r_out = cspan_md(Vout, nx, ny, nz); + r_in = cspan_slice(MD3, &r_in, {lx, hx}, {ly, hy}, {lz, hz}); + r_out = cspan_slice(MD3, &r_out, {lx, hx}, {ly, hy}, {lz, hz}); + + // C++23: for (auto [o, i] : std::views::zip(flat(r_out), flat(r_in))) { o = i; } + double sum = 0; + clock_t t = clock(); + + for (intptr_t s = 0; s < state; ++s) { + MD3_iter i = MD3_begin(&r_in); + MD3_iter o = MD3_begin(&r_out); + + for (; i.ref; MD3_next(&i), MD3_next(&o)) + { + *o.ref += *i.ref; + sum += *i.ref; + } + } + t = clock() - t; + printf("joined: %.1f ms, %f\n", 1000.0f * t / CLOCKS_PER_SEC, sum); +} + +int main() +{ + for (int i = 0; i < nx * ny * nz; ++i) + Vin[i] = i + 1.23; + + MDRanges_setup(n); + TraditionalForLoop(n); + MDRanges_nested_loop(n); + MDRanges_loop_over_joined(n); +} diff --git a/misc/benchmarks/various/names.txt b/misc/benchmarks/various/names.txt new file mode 100644 index 00000000..561acbbf --- /dev/null +++ b/misc/benchmarks/various/names.txt @@ -0,0 +1,5163 @@ +Mary +Patricia +Linda +Barbara +Elizabeth +Jennifer +Maria +Susan +Margaret +Dorothy +Lisa +Nancy +Karen +Betty +Helen +Sandra +Donna +Carol +Ruth +Sharon +Michelle +Laura +Sarah +Kimberly +Deborah +Jessica +Shirley +Cynthia +Angela +Melissa +Brenda +Amy +Anna +Rebecca +Virginia +Kathleen +Pamela +Martha +Debra +Amanda +Stephanie +Carolyn +Christine +Marie +Janet +Catherine +Frances +Ann +Joyce +Diane +Alice +Julie +Heather +Teresa +Doris +Gloria +Evelyn +Jean +Cheryl +Mildred +Katherine +Joan +Ashley +Judith +Rose +Janice +Kelly +Nicole +Judy +Christina +Kathy +Theresa +Beverly +Denise +Tammy +Irene +Jane +Lori +Rachel +Marilyn +Andrea +Kathryn +Louise +Sara +Anne +Jacqueline +Wanda +Bonnie +Julia +Ruby +Lois +Tina +Phyllis +Norma +Paula +Diana +Annie +Lillian +Emily +Robin +Peggy +Crystal +Gladys +Rita +Dawn +Connie +Florence +Tracy +Edna +Tiffany +Carmen +Rosa +Cindy +Grace +Wendy +Victoria +Edith +Kim +Sherry +Sylvia +Josephine +Thelma +Shannon +Sheila +Ethel +Ellen +Elaine +Marjorie +Carrie +Charlotte +Monica +Esther +Pauline +Emma +Juanita +Anita +Rhonda +Hazel +Amber +Eva +Debbie +April +Leslie +Clara +Lucille +Jamie +Joanne +Eleanor +Valerie +Danielle +Megan +Alicia +Suzanne +Michele +Gail +Bertha +Darlene +Veronica +Jill +Erin +Geraldine +Lauren +Cathy +Joann +Lorraine +Lynn +Sally +Regina +Erica +Beatrice +Dolores +Bernice +Audrey +Yvonne +Annette +June +Samantha +Marion +Dana +Stacy +Ana +Renee +Ida +Vivian +Roberta +Holly +Brittany +Melanie +Loretta +Yolanda +Jeanette +Laurie +Katie +Kristen +Vanessa +Alma +Sue +Elsie +Beth +Jeanne +Vicki +Carla +Tara +Rosemary +Eileen +Terri +Gertrude +Lucy +Tonya +Ella +Stacey +Wilma +Gina +Kristin +Jessie +Natalie +Agnes +Vera +Willie +Charlene +Bessie +Delores +Melinda +Pearl +Arlene +Maureen +Colleen +Allison +Tamara +Joy +Georgia +Constance +Lillie +Claudia +Jackie +Marcia +Tanya +Nellie +Minnie +Marlene +Heidi +Glenda +Lydia +Viola +Courtney +Marian +Stella +Caroline +Dora +Jo +Vickie +Mattie +Terry +Maxine +Irma +Mabel +Marsha +Myrtle +Lena +Christy +Deanna +Patsy +Hilda +Gwendolyn +Jennie +Nora +Margie +Nina +Cassandra +Leah +Penny +Kay +Priscilla +Naomi +Carole +Brandy +Olga +Billie +Dianne +Tracey +Leona +Jenny +Felicia +Sonia +Miriam +Velma +Becky +Bobbie +Violet +Kristina +Toni +Misty +Mae +Shelly +Daisy +Ramona +Sherri +Erika +Katrina +Claire +Lindsey +Lindsay +Geneva +Guadalupe +Belinda +Margarita +Sheryl +Cora +Faye +Ada +Natasha +Sabrina +Isabel +Marguerite +Hattie +Harriet +Molly +Cecilia +Kristi +Brandi +Blanche +Sandy +Rosie +Joanna +Iris +Eunice +Angie +Inez +Lynda +Madeline +Amelia +Alberta +Genevieve +Monique +Jodi +Janie +Maggie +Kayla +Sonya +Jan +Lee +Kristine +Candace +Fannie +Maryann +Opal +Alison +Yvette +Melody +Luz +Susie +Olivia +Flora +Shelley +Kristy +Mamie +Lula +Lola +Verna +Beulah +Antoinette +Candice +Juana +Jeannette +Pam +Kelli +Hannah +Whitney +Bridget +Karla +Celia +Latoya +Patty +Shelia +Gayle +Della +Vicky +Lynne +Sheri +Marianne +Kara +Jacquelyn +Erma +Blanca +Myra +Leticia +Pat +Krista +Roxanne +Angelica +Johnnie +Robyn +Francis +Adrienne +Rosalie +Alexandra +Brooke +Bethany +Sadie +Bernadette +Traci +Jody +Kendra +Jasmine +Nichole +Rachael +Chelsea +Mable +Ernestine +Muriel +Marcella +Elena +Krystal +Angelina +Nadine +Kari +Estelle +Dianna +Paulette +Lora +Mona +Doreen +Rosemarie +Angel +Desiree +Antonia +Hope +Ginger +Janis +Betsy +Christie +Freda +Mercedes +Meredith +Lynette +Teri +Cristina +Eula +Leigh +Meghan +Sophia +Eloise +Rochelle +Gretchen +Cecelia +Raquel +Henrietta +Alyssa +Jana +Kelley +Gwen +Kerry +Jenna +Tricia +Laverne +Olive +Alexis +Tasha +Silvia +Elvira +Casey +Delia +Sophie +Kate +Patti +Lorena +Kellie +Sonja +Lila +Lana +Darla +May +Mindy +Essie +Mandy +Lorene +Elsa +Josefina +Jeannie +Miranda +Dixie +Lucia +Marta +Faith +Lela +Johanna +Shari +Camille +Tami +Shawna +Elisa +Ebony +Melba +Ora +Nettie +Tabitha +Ollie +Jaime +Winifred +Kristie +Marina +Alisha +Aimee +Rena +Myrna +Marla +Tammie +Latasha +Bonita +Patrice +Ronda +Sherrie +Addie +Francine +Deloris +Stacie +Adriana +Cheri +Shelby +Abigail +Celeste +Jewel +Cara +Adele +Rebekah +Lucinda +Dorthy +Chris +Effie +Trina +Reba +Shawn +Sallie +Aurora +Lenora +Etta +Lottie +Kerri +Trisha +Nikki +Estella +Francisca +Josie +Tracie +Marissa +Karin +Brittney +Janelle +Lourdes +Laurel +Helene +Fern +Elva +Corinne +Kelsey +Ina +Bettie +Elisabeth +Aida +Caitlin +Ingrid +Iva +Eugenia +Christa +Goldie +Cassie +Maude +Jenifer +Therese +Frankie +Dena +Lorna +Janette +Latonya +Candy +Morgan +Consuelo +Tamika +Rosetta +Debora +Cherie +Polly +Dina +Jewell +Fay +Jillian +Dorothea +Nell +Trudy +Esperanza +Patrica +Kimberley +Shanna +Helena +Carolina +Cleo +Stefanie +Rosario +Ola +Janine +Mollie +Lupe +Alisa +Lou +Maribel +Susanne +Bette +Susana +Elise +Cecile +Isabelle +Lesley +Jocelyn +Paige +Joni +Rachelle +Leola +Daphne +Alta +Ester +Petra +Graciela +Imogene +Jolene +Keisha +Lacey +Glenna +Gabriela +Keri +Ursula +Lizzie +Kirsten +Shana +Adeline +Mayra +Jayne +Jaclyn +Gracie +Sondra +Carmela +Marisa +Rosalind +Charity +Tonia +Beatriz +Marisol +Clarice +Jeanine +Sheena +Angeline +Frieda +Lily +Robbie +Shauna +Millie +Claudette +Cathleen +Angelia +Gabrielle +Autumn +Katharine +Summer +Jodie +Staci +Lea +Christi +Jimmie +Justine +Elma +Luella +Margret +Dominique +Socorro +Rene +Martina +Margo +Mavis +Callie +Bobbi +Maritza +Lucile +Leanne +Jeannine +Deana +Aileen +Lorie +Ladonna +Willa +Manuela +Gale +Selma +Dolly +Sybil +Abby +Lara +Dale +Ivy +Dee +Winnie +Marcy +Luisa +Jeri +Magdalena +Ofelia +Meagan +Audra +Matilda +Leila +Cornelia +Bianca +Simone +Bettye +Randi +Virgie +Latisha +Barbra +Georgina +Eliza +Leann +Bridgette +Rhoda +Haley +Adela +Nola +Bernadine +Flossie +Ila +Greta +Ruthie +Nelda +Minerva +Lilly +Terrie +Letha +Hilary +Estela +Valarie +Brianna +Rosalyn +Earline +Catalina +Ava +Mia +Clarissa +Lidia +Corrine +Alexandria +Concepcion +Tia +Sharron +Rae +Dona +Ericka +Jami +Elnora +Chandra +Lenore +Neva +Marylou +Melisa +Tabatha +Serena +Avis +Allie +Sofia +Jeanie +Odessa +Nannie +Harriett +Loraine +Penelope +Milagros +Emilia +Benita +Allyson +Ashlee +Tania +Tommie +Esmeralda +Karina +Eve +Pearlie +Zelma +Malinda +Noreen +Tameka +Saundra +Hillary +Amie +Althea +Rosalinda +Jordan +Lilia +Alana +Gay +Clare +Alejandra +Elinor +Michael +Lorrie +Jerri +Darcy +Earnestine +Carmella +Taylor +Noemi +Marcie +Liza +Annabelle +Louisa +Earlene +Mallory +Carlene +Nita +Selena +Tanisha +Katy +Julianne +John +Lakisha +Edwina +Maricela +Margery +Kenya +Dollie +Roxie +Roslyn +Kathrine +Nanette +Charmaine +Lavonne +Ilene +Kris +Tammi +Suzette +Corine +Kaye +Jerry +Merle +Chrystal +Lina +Deanne +Lilian +Juliana +Aline +Luann +Kasey +Maryanne +Evangeline +Colette +Melva +Lawanda +Yesenia +Nadia +Madge +Kathie +Eddie +Ophelia +Valeria +Nona +Mitzi +Mari +Georgette +Claudine +Fran +Alissa +Roseann +Lakeisha +Susanna +Reva +Deidre +Chasity +Sheree +Carly +James +Elvia +Alyce +Deirdre +Gena +Briana +Araceli +Katelyn +Rosanne +Wendi +Tessa +Berta +Marva +Imelda +Marietta +Marci +Leonor +Arline +Sasha +Madelyn +Janna +Juliette +Deena +Aurelia +Josefa +Augusta +Liliana +Young +Christian +Lessie +Amalia +Savannah +Anastasia +Vilma +Natalia +Rosella +Lynnette +Corina +Alfreda +Leanna +Carey +Amparo +Coleen +Tamra +Aisha +Wilda +Karyn +Cherry +Queen +Maura +Mai +Evangelina +Rosanna +Hallie +Erna +Enid +Mariana +Lacy +Juliet +Jacklyn +Freida +Madeleine +Mara +Hester +Cathryn +Lelia +Casandra +Bridgett +Angelita +Jannie +Dionne +Annmarie +Katina +Beryl +Phoebe +Millicent +Katheryn +Diann +Carissa +Maryellen +Liz +Lauri +Helga +Gilda +Adrian +Rhea +Marquita +Hollie +Tisha +Tamera +Angelique +Francesca +Britney +Kaitlin +Lolita +Florine +Rowena +Reyna +Twila +Fanny +Janell +Ines +Concetta +Bertie +Alba +Brigitte +Alyson +Vonda +Pansy +Elba +Noelle +Letitia +Kitty +Deann +Brandie +Louella +Leta +Felecia +Sharlene +Lesa +Beverley +Robert +Isabella +Herminia +Terra +Celina +Tori +Octavia +Jade +Denice +Germaine +Sierra +Michell +Cortney +Nelly +Doretha +Sydney +Deidra +Monika +Lashonda +Judi +Chelsey +Antionette +Margot +Bobby +Adelaide +Nan +Leeann +Elisha +Dessie +Libby +Kathi +Gayla +Latanya +Mina +Mellisa +Kimberlee +Jasmin +Renae +Zelda +Elda +Ma +Justina +Gussie +Emilie +Camilla +Abbie +Rocio +Kaitlyn +Jesse +Edythe +Ashleigh +Selina +Lakesha +Geri +Allene +Pamala +Michaela +Dayna +Caryn +Rosalia +Sun +Jacquline +Rebeca +Marybeth +Krystle +Iola +Dottie +Bennie +Belle +Aubrey +Griselda +Ernestina +Elida +Adrianne +Demetria +Delma +Chong +Jaqueline +Destiny +Arleen +Virgina +Retha +Fatima +Tillie +Eleanore +Cari +Treva +Birdie +Wilhelmina +Rosalee +Maurine +Latrice +Yong +Jena +Taryn +Elia +Debby +Maudie +Jeanna +Delilah +Catrina +Shonda +Hortencia +Theodora +Teresita +Robbin +Danette +Maryjane +Freddie +Delphine +Brianne +Nilda +Danna +Cindi +Bess +Iona +Hanna +Ariel +Winona +Vida +Rosita +Marianna +William +Racheal +Guillermina +Eloisa +Celestine +Caren +Malissa +Lona +Chantel +Shellie +Marisela +Leora +Agatha +Soledad +Migdalia +Ivette +Christen +Athena +Janel +Chloe +Veda +Pattie +Tessie +Tera +Marilynn +Lucretia +Karrie +Dinah +Daniela +Alecia +Adelina +Vernice +Shiela +Portia +Merry +Lashawn +Devon +Dara +Tawana +Oma +Verda +Christin +Alene +Zella +Sandi +Rafaela +Maya +Kira +Candida +Alvina +Suzan +Shayla +Lyn +Lettie +Alva +Samatha +Oralia +Matilde +Madonna +Larissa +Vesta +Renita +India +Delois +Shanda +Phillis +Lorri +Erlinda +Cruz +Cathrine +Barb +Zoe +Isabell +Ione +Gisela +Charlie +Valencia +Roxanna +Mayme +Kisha +Ellie +Mellissa +Dorris +Dalia +Bella +Annetta +Zoila +Reta +Reina +Lauretta +Kylie +Christal +Pilar +Charla +Elissa +Tiffani +Tana +Paulina +Leota +Breanna +Jayme +Carmel +Vernell +Tomasa +Mandi +Dominga +Santa +Melodie +Lura +Alexa +Tamela +Ryan +Mirna +Kerrie +Venus +Noel +Felicita +Cristy +Carmelita +Berniece +Annemarie +Tiara +Roseanne +Missy +Cori +Roxana +Pricilla +Kristal +Jung +Elyse +Haydee +Aletha +Bettina +Marge +Gillian +Filomena +Charles +Zenaida +Harriette +Caridad +Vada +Una +Aretha +Pearline +Marjory +Marcela +Flor +Evette +Elouise +Alina +Trinidad +David +Damaris +Catharine +Carroll +Belva +Nakia +Marlena +Luanne +Lorine +Karon +Dorene +Danita +Brenna +Tatiana +Sammie +Louann +Loren +Julianna +Andria +Philomena +Lucila +Leonora +Dovie +Romona +Mimi +Jacquelin +Gaye +Tonja +Misti +Joe +Gene +Chastity +Stacia +Roxann +Micaela +Nikita +Mei +Velda +Marlys +Johnna +Aura +Lavern +Ivonne +Hayley +Nicki +Majorie +Herlinda +George +Alpha +Yadira +Perla +Gregoria +Daniel +Antonette +Shelli +Mozelle +Mariah +Joelle +Cordelia +Josette +Chiquita +Trista +Louis +Laquita +Georgiana +Candi +Shanon +Lonnie +Hildegard +Cecil +Valentina +Stephany +Magda +Karol +Gerry +Gabriella +Tiana +Roma +Richelle +Ray +Princess +Oleta +Jacque +Idella +Alaina +Suzanna +Jovita +Blair +Tosha +Raven +Nereida +Marlyn +Kyla +Joseph +Delfina +Tena +Stephenie +Sabina +Nathalie +Marcelle +Gertie +Darleen +Thea +Sharonda +Shantel +Belen +Venessa +Rosalina +Ona +Genoveva +Corey +Clementine +Rosalba +Renate +Renata +Mi +Ivory +Georgianna +Floy +Dorcas +Ariana +Tyra +Theda +Mariam +Juli +Jesica +Donnie +Vikki +Verla +Roselyn +Melvina +Jannette +Ginny +Debrah +Corrie +Asia +Violeta +Myrtis +Latricia +Collette +Charleen +Anissa +Viviana +Twyla +Precious +Nedra +Latonia +Lan +Hellen +Fabiola +Annamarie +Adell +Sharyn +Chantal +Niki +Maud +Lizette +Lindy +Kia +Kesha +Jeana +Danelle +Charline +Chanel +Carrol +Valorie +Lia +Dortha +Cristal +Sunny +Leone +Leilani +Gerri +Debi +Andra +Keshia +Ima +Eulalia +Easter +Dulce +Natividad +Linnie +Kami +Georgie +Catina +Brook +Alda +Winnifred +Sharla +Ruthann +Meaghan +Magdalene +Lissette +Adelaida +Venita +Trena +Shirlene +Shameka +Elizebeth +Dian +Shanta +Mickey +Latosha +Carlotta +Windy +Soon +Rosina +Mariann +Leisa +Jonnie +Dawna +Cathie +Billy +Astrid +Sidney +Laureen +Janeen +Holli +Fawn +Vickey +Teressa +Shante +Rubye +Marcelina +Chanda +Cary +Terese +Scarlett +Marty +Marnie +Lulu +Lisette +Jeniffer +Elenor +Dorinda +Donita +Carman +Bernita +Altagracia +Aleta +Adrianna +Zoraida +Ronnie +Nicola +Lyndsey +Kendall +Janina +Chrissy +Ami +Starla +Phylis +Phuong +Kyra +Charisse +Blanch +Sanjuanita +Rona +Nanci +Marilee +Maranda +Cory +Brigette +Sanjuana +Marita +Kassandra +Joycelyn +Ira +Felipa +Chelsie +Bonny +Mireya +Lorenza +Kyong +Ileana +Candelaria +Tony +Toby +Sherie +Ok +Mark +Lucie +Leatrice +Lakeshia +Gerda +Edie +Bambi +Marylin +Lavon +Hortense +Garnet +Evie +Tressa +Shayna +Lavina +Kyung +Jeanetta +Sherrill +Shara +Phyliss +Mittie +Anabel +Alesia +Thuy +Tawanda +Richard +Joanie +Tiffanie +Lashanda +Karissa +Enriqueta +Daria +Daniella +Corinna +Alanna +Abbey +Roxane +Roseanna +Magnolia +Lida +Kyle +Joellen +Era +Coral +Carleen +Tresa +Peggie +Novella +Nila +Maybelle +Jenelle +Carina +Nova +Melina +Marquerite +Margarette +Josephina +Evonne +Devin +Cinthia +Albina +Toya +Tawnya +Sherita +Santos +Myriam +Lizabeth +Lise +Keely +Jenni +Giselle +Cheryle +Ardith +Ardis +Alesha +Adriane +Shaina +Linnea +Karolyn +Hong +Florida +Felisha +Dori +Darci +Artie +Armida +Zola +Xiomara +Vergie +Shamika +Nena +Nannette +Maxie +Lovie +Jeane +Jaimie +Inge +Farrah +Elaina +Caitlyn +Starr +Felicitas +Cherly +Caryl +Yolonda +Yasmin +Teena +Prudence +Pennie +Nydia +Mackenzie +Orpha +Marvel +Lizbeth +Laurette +Jerrie +Hermelinda +Carolee +Tierra +Mirian +Meta +Melony +Kori +Jennette +Jamila +Ena +Anh +Yoshiko +Susannah +Salina +Rhiannon +Joleen +Cristine +Ashton +Aracely +Tomeka +Shalonda +Marti +Lacie +Kala +Jada +Ilse +Hailey +Brittani +Zona +Syble +Sherryl +Randy +Nidia +Marlo +Kandice +Kandi +Deb +Dean +America +Alycia +Tommy +Ronna +Norene +Mercy +Jose +Ingeborg +Giovanna +Gemma +Christel +Audry +Zora +Vita +Van +Trish +Stephaine +Shirlee +Shanika +Melonie +Mazie +Jazmin +Inga +Hoa +Hettie +Geralyn +Fonda +Estrella +Adella +Su +Sarita +Rina +Milissa +Maribeth +Golda +Evon +Ethelyn +Enedina +Cherise +Chana +Velva +Tawanna +Sade +Mirta +Li +Karie +Jacinta +Elna +Davina +Cierra +Ashlie +Albertha +Tanesha +Stephani +Nelle +Mindi +Lu +Lorinda +Larue +Florene +Demetra +Dedra +Ciara +Chantelle +Ashly +Suzy +Rosalva +Noelia +Lyda +Leatha +Krystyna +Kristan +Karri +Darline +Darcie +Cinda +Cheyenne +Cherrie +Awilda +Almeda +Rolanda +Lanette +Jerilyn +Gisele +Evalyn +Cyndi +Cleta +Carin +Zina +Zena +Velia +Tanika +Paul +Charissa +Thomas +Talia +Margarete +Lavonda +Kaylee +Kathlene +Jonna +Irena +Ilona +Idalia +Candis +Candance +Brandee +Anitra +Alida +Sigrid +Nicolette +Maryjo +Linette +Hedwig +Christiana +Cassidy +Alexia +Tressie +Modesta +Lupita +Lita +Gladis +Evelia +Davida +Cherri +Cecily +Ashely +Annabel +Agustina +Wanita +Shirly +Rosaura +Hulda +Eun +Bailey +Yetta +Verona +Thomasina +Sibyl +Shannan +Mechelle +Lue +Leandra +Lani +Kylee +Kandy +Jolynn +Ferne +Eboni +Corene +Alysia +Zula +Nada +Moira +Lyndsay +Lorretta +Juan +Jammie +Hortensia +Gaynell +Cameron +Adria +Vina +Vicenta +Tangela +Stephine +Norine +Nella +Liana +Leslee +Kimberely +Iliana +Glory +Felica +Emogene +Elfriede +Eden +Eartha +Carma +Bea +Ocie +Marry +Lennie +Kiara +Jacalyn +Carlota +Arielle +Yu +Star +Otilia +Kirstin +Kacey +Johnetta +Joey +Joetta +Jeraldine +Jaunita +Elana +Dorthea +Cami +Amada +Adelia +Vernita +Tamar +Siobhan +Renea +Rashida +Ouida +Odell +Nilsa +Meryl +Kristyn +Julieta +Danica +Breanne +Aurea +Anglea +Sherron +Odette +Malia +Lorelei +Lin +Leesa +Kenna +Kathlyn +Fiona +Charlette +Suzie +Shantell +Sabra +Racquel +Myong +Mira +Martine +Lucienne +Lavada +Juliann +Johnie +Elvera +Delphia +Clair +Christiane +Charolette +Carri +Augustine +Asha +Angella +Paola +Ninfa +Leda +Lai +Eda +Sunshine +Stefani +Shanell +Palma +Machelle +Lissa +Kecia +Kathryne +Karlene +Julissa +Jettie +Jenniffer +Hui +Corrina +Christopher +Carolann +Alena +Tess +Rosaria +Myrtice +Marylee +Liane +Kenyatta +Judie +Janey +In +Elmira +Eldora +Denna +Cristi +Cathi +Zaida +Vonnie +Viva +Vernie +Rosaline +Mariela +Luciana +Lesli +Karan +Felice +Deneen +Adina +Wynona +Tarsha +Sheron +Shasta +Shanita +Shani +Shandra +Randa +Pinkie +Paris +Nelida +Marilou +Lyla +Laurene +Laci +Joi +Janene +Dorotha +Daniele +Dani +Carolynn +Carlyn +Berenice +Ayesha +Anneliese +Alethea +Thersa +Tamiko +Rufina +Oliva +Mozell +Marylyn +Madison +Kristian +Kathyrn +Kasandra +Kandace +Janae +Gabriel +Domenica +Debbra +Dannielle +Chun +Buffy +Barbie +Arcelia +Aja +Zenobia +Sharen +Sharee +Patrick +Page +My +Lavinia +Kum +Kacie +Jackeline +Huong +Felisa +Emelia +Eleanora +Cythia +Cristin +Clyde +Claribel +Caron +Anastacia +Zulma +Zandra +Yoko +Tenisha +Susann +Sherilyn +Shay +Shawanda +Sabine +Romana +Mathilda +Linsey +Keiko +Joana +Isela +Gretta +Georgetta +Eugenie +Dusty +Desirae +Delora +Corazon +Antonina +Anika +Willene +Tracee +Tamatha +Regan +Nichelle +Mickie +Maegan +Luana +Lanita +Kelsie +Edelmira +Bree +Afton +Teodora +Tamie +Shena +Meg +Linh +Keli +Kaci +Danyelle +Britt +Arlette +Albertine +Adelle +Tiffiny +Stormy +Simona +Numbers +Nicolasa +Nichol +Nia +Nakisha +Mee +Maira +Loreen +Kizzy +Johnny +Jay +Fallon +Christene +Bobbye +Anthony +Ying +Vincenza +Tanja +Rubie +Roni +Queenie +Margarett +Kimberli +Irmgard +Idell +Hilma +Evelina +Esta +Emilee +Dennise +Dania +Carl +Carie +Antonio +Wai +Sang +Risa +Rikki +Particia +Mui +Masako +Mario +Luvenia +Loree +Loni +Lien +Kevin +Gigi +Florencia +Dorian +Denita +Dallas +Chi +Billye +Alexander +Tomika +Sharita +Rana +Nikole +Neoma +Margarite +Madalyn +Lucina +Laila +Kali +Jenette +Gabriele +Evelyne +Elenora +Clementina +Alejandrina +Zulema +Violette +Vannessa +Thresa +Retta +Pia +Patience +Noella +Nickie +Jonell +Delta +Chung +Chaya +Camelia +Bethel +Anya +Andrew +Thanh +Suzann +Spring +Shu +Mila +Lilla +Laverna +Keesha +Kattie +Gia +Georgene +Eveline +Estell +Elizbeth +Vivienne +Vallie +Trudie +Stephane +Michel +Magaly +Madie +Kenyetta +Karren +Janetta +Hermine +Harmony +Drucilla +Debbi +Celestina +Candie +Britni +Beckie +Amina +Zita +Yun +Yolande +Vivien +Vernetta +Trudi +Sommer +Pearle +Patrina +Ossie +Nicolle +Loyce +Letty +Larisa +Katharina +Joselyn +Jonelle +Jenell +Iesha +Heide +Florinda +Florentina +Flo +Elodia +Dorine +Brunilda +Brigid +Ashli +Ardella +Twana +Thu +Tarah +Sung +Shea +Shavon +Shane +Serina +Rayna +Ramonita +Nga +Margurite +Lucrecia +Kourtney +Kati +Jesus +Jesenia +Diamond +Crista +Ayana +Alica +Alia +Vinnie +Suellen +Romelia +Rachell +Piper +Olympia +Michiko +Kathaleen +Jolie +Jessi +Janessa +Hana +Ha +Elease +Carletta +Britany +Shona +Salome +Rosamond +Regena +Raina +Ngoc +Nelia +Louvenia +Lesia +Latrina +Laticia +Larhonda +Jina +Jacki +Hollis +Holley +Emmy +Deeann +Coretta +Arnetta +Velvet +Thalia +Shanice +Neta +Mikki +Micki +Lonna +Leana +Lashunda +Kiley +Joye +Jacqulyn +Ignacia +Hyun +Hiroko +Henry +Henriette +Elayne +Delinda +Darnell +Dahlia +Coreen +Consuela +Conchita +Celine +Babette +Ayanna +Anette +Albertina +Skye +Shawnee +Shaneka +Quiana +Pamelia +Min +Merri +Merlene +Margit +Kiesha +Kiera +Kaylene +Jodee +Jenise +Erlene +Emmie +Else +Daryl +Dalila +Daisey +Cody +Casie +Belia +Babara +Versie +Vanesa +Shelba +Shawnda +Sam +Norman +Nikia +Naoma +Marna +Margeret +Madaline +Lawana +Kindra +Jutta +Jazmine +Janett +Hannelore +Glendora +Gertrud +Garnett +Freeda +Frederica +Florance +Flavia +Dennis +Carline +Beverlee +Anjanette +Valda +Trinity +Tamala +Stevie +Shonna +Sha +Sarina +Oneida +Micah +Merilyn +Marleen +Lurline +Lenna +Katherin +Jin +Jeni +Hae +Gracia +Glady +Farah +Eric +Enola +Ema +Dominque +Devona +Delana +Cecila +Caprice +Alysha +Ali +Alethia +Vena +Theresia +Tawny +Song +Shakira +Samara +Sachiko +Rachele +Pamella +Nicky +Marni +Mariel +Maren +Malisa +Ligia +Lera +Latoria +Larae +Kimber +Kathern +Karey +Jennefer +Janeth +Halina +Fredia +Delisa +Debroah +Ciera +Chin +Angelika +Andree +Altha +Yen +Vivan +Terresa +Tanna +Suk +Sudie +Soo +Signe +Salena +Ronni +Rebbecca +Myrtie +Mckenzie +Malika +Maida +Loan +Leonarda +Kayleigh +France +Ethyl +Ellyn +Dayle +Cammie +Brittni +Birgit +Avelina +Asuncion +Arianna +Akiko +Venice +Tyesha +Tonie +Tiesha +Takisha +Steffanie +Sindy +Santana +Meghann +Manda +Macie +Lady +Kellye +Kellee +Joslyn +Jason +Inger +Indira +Glinda +Glennis +Fernanda +Faustina +Eneida +Elicia +Dot +Digna +Dell +Arletta +Andre +Willia +Tammara +Tabetha +Sherrell +Sari +Refugio +Rebbeca +Pauletta +Nieves +Natosha +Nakita +Mammie +Kenisha +Kazuko +Kassie +Gary +Earlean +Daphine +Corliss +Clotilde +Carolyne +Bernetta +Augustina +Audrea +Annis +Annabell +Yan +Tennille +Tamica +Selene +Sean +Rosana +Regenia +Qiana +Markita +Macy +Leeanne +Laurine +Kym +Jessenia +Janita +Georgine +Genie +Emiko +Elvie +Deandra +Dagmar +Corie +Collen +Cherish +Romaine +Porsha +Pearlene +Micheline +Merna +Margorie +Margaretta +Lore +Kenneth +Jenine +Hermina +Fredericka +Elke +Drusilla +Dorathy +Dione +Desire +Celena +Brigida +Angeles +Allegra +Theo +Tamekia +Synthia +Stephen +Sook +Slyvia +Rosann +Reatha +Raye +Marquetta +Margart +Ling +Layla +Kymberly +Kiana +Kayleen +Katlyn +Karmen +Joella +Irina +Emelda +Eleni +Detra +Clemmie +Cheryll +Chantell +Cathey +Arnita +Arla +Angle +Angelic +Alyse +Zofia +Thomasine +Tennie +Son +Sherly +Sherley +Sharyl +Remedios +Petrina +Nickole +Myung +Myrle +Mozella +Louanne +Lisha +Latia +Lane +Krysta +Julienne +Joel +Jeanene +Jacqualine +Isaura +Gwenda +Earleen +Donald +Cleopatra +Carlie +Audie +Antonietta +Alise +Alex +Verdell +Val +Tyler +Tomoko +Thao +Talisha +Steven +So +Shemika +Shaun +Scarlet +Savanna +Santina +Rosia +Raeann +Odilia +Nana +Minna +Magan +Lynelle +Le +Karma +Joeann +Ivana +Inell +Ilana +Hye +Honey +Hee +Gudrun +Frank +Dreama +Crissy +Chante +Carmelina +Arvilla +Arthur +Annamae +Alvera +Aleida +Aaron +Yee +Yanira +Vanda +Tianna +Tam +Stefania +Shira +Perry +Nicol +Nancie +Monserrate +Minh +Melynda +Melany +Matthew +Lovella +Laure +Kirby +Kacy +Jacquelynn +Hyon +Gertha +Francisco +Eliana +Christena +Christeen +Charise +Caterina +Carley +Candyce +Arlena +Ammie +Yang +Willette +Vanita +Tuyet +Tiny +Syreeta +Silva +Scott +Ronald +Penney +Nyla +Michal +Maurice +Maryam +Marya +Magen +Ludie +Loma +Livia +Lanell +Kimberlie +Julee +Donetta +Diedra +Denisha +Deane +Dawne +Clarine +Cherryl +Bronwyn +Brandon +Alla +Valery +Tonda +Sueann +Soraya +Shoshana +Shela +Sharleen +Shanelle +Nerissa +Micheal +Meridith +Mellie +Maye +Maple +Magaret +Luis +Lili +Leonila +Leonie +Leeanna +Lavonia +Lavera +Kristel +Kathey +Kathe +Justin +Julian +Jimmy +Jann +Ilda +Hildred +Hildegarde +Genia +Fumiko +Evelin +Ermelinda +Elly +Dung +Doloris +Dionna +Danae +Berneice +Annice +Alix +Verena +Verdie +Tristan +Shawnna +Shawana +Shaunna +Rozella +Randee +Ranae +Milagro +Lynell +Luise +Louie +Loida +Lisbeth +Karleen +Junita +Jona +Isis +Hyacinth +Hedy +Gwenn +Ethelene +Erline +Edward +Donya +Domonique +Delicia +Dannette +Cicely +Branda +Blythe +Bethann +Ashlyn +Annalee +Alline +Yuko +Vella +Trang +Towanda +Tesha +Sherlyn +Narcisa +Miguelina +Meri +Maybell +Marlana +Marguerita +Madlyn +Luna +Lory +Loriann +Liberty +Leonore +Leighann +Laurice +Latesha +Laronda +Katrice +Kasie +Karl +Kaley +Jadwiga +Glennie +Gearldine +Francina +Epifania +Dyan +Dorie +Diedre +Denese +Demetrice +Delena +Darby +Cristie +Cleora +Catarina +Carisa +Bernie +Barbera +Almeta +Trula +Tereasa +Solange +Sheilah +Shavonne +Sanora +Rochell +Mathilde +Margareta +Maia +Lynsey +Lawanna +Launa +Kena +Keena +Katia +Jamey +Glynda +Gaylene +Elvina +Elanor +Danuta +Danika +Cristen +Cordie +Coletta +Clarita +Carmon +Brynn +Azucena +Aundrea +Angele +Yi +Walter +Verlie +Verlene +Tamesha +Silvana +Sebrina +Samira +Reda +Raylene +Penni +Pandora +Norah +Noma +Mireille +Melissia +Maryalice +Laraine +Kimbery +Karyl +Karine +Kam +Jolanda +Johana +Jesusa +Jaleesa +Jae +Jacquelyne +Irish +Iluminada +Hilaria +Hanh +Gennie +Francie +Floretta +Exie +Edda +Drema +Delpha +Bev +Barbar +Assunta +Ardell +Annalisa +Alisia +Yukiko +Yolando +Wonda +Wei +Waltraud +Veta +Tequila +Temeka +Tameika +Shirleen +Shenita +Piedad +Ozella +Mirtha +Marilu +Kimiko +Juliane +Jenice +Jen +Janay +Jacquiline +Hilde +Fe +Fae +Evan +Eugene +Elois +Echo +Devorah +Chau +Brinda +Betsey +Arminda +Aracelis +Apryl +Annett +Alishia +Veola +Usha +Toshiko +Theola +Tashia +Talitha +Shery +Rudy +Renetta +Reiko +Rasheeda +Omega +Obdulia +Mika +Melaine +Meggan +Martin +Marlen +Marget +Marceline +Mana +Magdalen +Librada +Lezlie +Lexie +Latashia +Lasandra +Kelle +Isidra +Isa +Inocencia +Gwyn +Francoise +Erminia +Erinn +Dimple +Devora +Criselda +Armanda +Arie +Ariane +Angelo +Angelena +Allen +Aliza +Adriene +Adaline +Xochitl +Twanna +Tran +Tomiko +Tamisha +Taisha +Susy +Siu +Rutha +Roxy +Rhona +Raymond +Otha +Noriko +Natashia +Merrie +Melvin +Marinda +Mariko +Margert +Loris +Lizzette +Leisha +Kaila +Ka +Joannie +Jerrica +Jene +Jannet +Janee +Jacinda +Herta +Elenore +Doretta +Delaine +Daniell +Claudie +China +Britta +Apolonia +Amberly +Alease +Yuri +Yuk +Wen +Waneta +Ute +Tomi +Sharri +Sandie +Roselle +Reynalda +Raguel +Phylicia +Patria +Olimpia +Odelia +Mitzie +Mitchell +Miss +Minda +Mignon +Mica +Mendy +Marivel +Maile +Lynetta +Lavette +Lauryn +Latrisha +Lakiesha +Kiersten +Kary +Josphine +Jolyn +Jetta +Janise +Jacquie +Ivelisse +Glynis +Gianna +Gaynelle +Emerald +Demetrius +Danyell +Danille +Dacia +Coralee +Cher +Ceola +Brett +Bell +Arianne +Aleshia +Yung +Williemae +Troy +Trinh +Thora +Tai +Svetlana +Sherika +Shemeka +Shaunda +Roseline +Ricki +Melda +Mallie +Lavonna +Latina +Larry +Laquanda +Lala +Lachelle +Klara +Kandis +Johna +Jeanmarie +Jaye +Hang +Grayce +Gertude +Emerita +Ebonie +Clorinda +Ching +Chery +Carola +Breann +Blossom +Bernardine +Becki +Arletha +Argelia +Ara +Alita +Yulanda +Yon +Yessenia +Tobi +Tasia +Sylvie +Shirl +Shirely +Sheridan +Shella +Shantelle +Sacha +Royce +Rebecka +Reagan +Providencia +Paulene +Misha +Miki +Marline +Marica +Lorita +Latoyia +Lasonya +Kerstin +Kenda +Keitha +Kathrin +Jaymie +Jack +Gricelda +Ginette +Eryn +Elina +Elfrieda +Danyel +Cheree +Chanelle +Barrie +Avery +Aurore +Annamaria +Alleen +Ailene +Aide +Yasmine +Vashti +Valentine +Treasa +Tory +Tiffaney +Sheryll +Sharie +Shanae +Sau +Raisa +Pa +Neda +Mitsuko +Mirella +Milda +Maryanna +Maragret +Mabelle +Luetta +Lorina +Letisha +Latarsha +Lanelle +Lajuana +Krissy +Karly +Karena +Jon +Jessika +Jerica +Jeanelle +January +Jalisa +Jacelyn +Izola +Ivey +Gregory +Euna +Etha +Drew +Domitila +Dominica +Daina +Creola +Carli +Camie +Bunny +Brittny +Ashanti +Anisha +Aleen +Adah +Yasuko +Winter +Viki +Valrie +Tona +Tinisha +Thi +Terisa +Tatum +Taneka +Simonne +Shalanda +Serita +Ressie +Refugia +Paz +Olene +Na +Merrill +Margherita +Mandie +Man +Maire +Lyndia +Luci +Lorriane +Loreta +Leonia +Lavona +Lashawnda +Lakia +Kyoko +Krystina +Krysten +Kenia +Kelsi +Jude +Jeanice +Isobel +Georgiann +Genny +Felicidad +Eilene +Deon +Deloise +Deedee +Dannie +Conception +Clora +Cherilyn +Chang +Calandra +Berry +Armandina +Anisa +Ula +Timothy +Tiera +Theressa +Stephania +Sima +Shyla +Shonta +Shera +Shaquita +Shala +Sammy +Rossana +Nohemi +Nery +Moriah +Melita +Melida +Melani +Marylynn +Marisha +Mariette +Malorie +Madelene +Ludivina +Loria +Lorette +Loralee +Lianne +Leon +Lavenia +Laurinda +Lashon +Kit +Kimi +Keila +Katelynn +Kai +Jone +Joane +Ji +Jayna +Janella +Ja +Hue +Hertha +Francene +Elinore +Despina +Delsie +Deedra +Clemencia +Carry +Carolin +Carlos +Bulah +Brittanie +Bok +Blondell +Bibi +Beaulah +Beata +Annita +Agripina +Virgen +Valene +Un +Twanda +Tommye +Toi +Tarra +Tari +Tammera +Shakia +Sadye +Ruthanne +Rochel +Rivka +Pura +Nenita +Natisha +Ming +Merrilee +Melodee +Marvis +Lucilla +Leena +Laveta +Larita +Lanie +Keren +Ileen +Georgeann +Genna +Genesis +Frida +Ewa +Eufemia +Emely +Ela +Edyth +Deonna +Deadra +Darlena +Chanell +Chan +Cathern +Cassondra +Cassaundra +Bernarda +Berna +Arlinda +Anamaria +Albert +Wesley +Vertie +Valeri +Torri +Tatyana +Stasia +Sherise +Sherill +Season +Scottie +Sanda +Ruthe +Rosy +Roberto +Robbi +Ranee +Quyen +Pearly +Palmira +Onita +Nisha +Niesha +Nida +Nevada +Nam +Merlyn +Mayola +Marylouise +Maryland +Marx +Marth +Margene +Madelaine +Londa +Leontine +Leoma +Leia +Lawrence +Lauralee +Lanora +Lakita +Kiyoko +Keturah +Katelin +Kareen +Jonie +Johnette +Jenee +Jeanett +Izetta +Hiedi +Heike +Hassie +Harold +Giuseppina +Georgann +Fidela +Fernande +Elwanda +Ellamae +Eliz +Dusti +Dotty +Cyndy +Coralie +Celesta +Argentina +Alverta +Xenia +Wava +Vanetta +Torrie +Tashina +Tandy +Tambra +Tama +Stepanie +Shila +Shaunta +Sharan +Shaniqua +Shae +Setsuko +Serafina +Sandee +Rosamaria +Priscila +Olinda +Nadene +Muoi +Michelina +Mercedez +Maryrose +Marin +Marcene +Mao +Magali +Mafalda +Logan +Linn +Lannie +Kayce +Karoline +Kamilah +Kamala +Justa +Joline +Jennine +Jacquetta +Iraida +Gerald +Georgeanna +Franchesca +Fairy +Emeline +Elane +Ehtel +Earlie +Dulcie +Dalene +Cris +Classie +Chere +Charis +Caroyln +Carmina +Carita +Brian +Bethanie +Ayako +Arica +An +Alysa +Alessandra +Akilah +Adrien +Zetta +Youlanda +Yelena +Yahaira +Xuan +Wendolyn +Victor +Tijuana +Terrell +Terina +Teresia +Suzi +Sunday +Sherell +Shavonda +Shaunte +Sharda +Shakita +Sena +Ryann +Rubi +Riva +Reginia +Rea +Rachal +Parthenia +Pamula +Monnie +Monet +Michaele +Melia +Marine +Malka +Maisha +Lisandra +Leo +Lekisha +Lean +Laurence +Lakendra +Krystin +Kortney +Kizzie +Kittie +Kera +Kendal +Kemberly +Kanisha +Julene +Jule +Joshua +Johanne +Jeffrey +Jamee +Han +Halley +Gidget +Galina +Fredricka +Fleta +Fatimah +Eusebia +Elza +Eleonore +Dorthey +Doria +Donella +Dinorah +Delorse +Claretha +Christinia +Charlyn +Bong +Belkis +Azzie +Andera +Aiko +Adena +Yer +Yajaira +Wan +Vania +Ulrike +Toshia +Tifany +Stefany +Shizue +Shenika +Shawanna +Sharolyn +Sharilyn +Shaquana +Shantay +See +Rozanne +Roselee +Rickie +Remona +Reanna +Raelene +Quinn +Phung +Petronila +Natacha +Nancey +Myrl +Miyoko +Miesha +Merideth +Marvella +Marquitta +Marhta +Marchelle +Lizeth +Libbie +Lahoma +Ladawn +Kina +Katheleen +Katharyn +Karisa +Kaleigh +Junie +Julieann +Johnsie +Janean +Jaimee +Jackqueline +Hisako +Herma +Helaine +Gwyneth +Glenn +Gita +Eustolia +Emelina +Elin +Edris +Donnette +Donnetta +Dierdre +Denae +Darcel +Claude +Clarisa +Cinderella +Chia +Charlesetta +Charita +Celsa +Cassy +Cassi +Carlee +Bruna +Brittaney +Brande +Billi +Bao +Antonetta +Angla +Angelyn +Analisa +Alane +Wenona +Wendie +Veronique +Vannesa +Tobie +Tempie +Sumiko +Sulema +Sparkle +Somer +Sheba +Shayne +Sharice +Shanel +Shalon +Sage +Roy +Rosio +Roselia +Renay +Rema +Reena +Porsche +Ping +Peg +Ozie +Oretha +Oralee +Oda +Nu +Ngan +Nakesha +Milly +Marybelle +Marlin +Maris +Margrett +Maragaret +Manie +Lurlene +Lillia +Lieselotte +Lavelle +Lashaunda +Lakeesha +Keith +Kaycee +Kalyn +Joya +Joette +Jenae +Janiece +Illa +Grisel +Glayds +Genevie +Gala +Fredda +Fred +Elmer +Eleonor +Debera +Deandrea +Dan +Corrinne +Cordia +Contessa +Colene +Cleotilde +Charlott +Chantay +Cecille +Beatris +Azalee +Arlean +Ardath +Anjelica +Anja +Alfredia +Aleisha +Adam +Zada +Yuonne +Xiao +Willodean +Whitley +Vennie +Vanna +Tyisha +Tova +Torie +Tonisha +Tilda +Tien +Temple +Sirena +Sherril +Shanti +Shan +Senaida +Samella +Robbyn +Renda +Reita +Phebe +Paulita +Nobuko +Nguyet +Neomi +Moon +Mikaela +Melania +Maximina +Marg +Maisie +Lynna +Lilli +Layne +Lashaun +Lakenya +Lael +Kirstie +Kathline +Kasha +Karlyn +Karima +Jovan +Josefine +Jennell +Jacqui +Jackelyn +Hyo +Hien +Grazyna +Florrie +Floria +Eleonora +Dwana +Dorla +Dong +Delmy +Deja +Dede +Dann +Crysta +Clelia +Claris +Clarence +Chieko +Cherlyn +Cherelle +Charmain +Chara +Cammy +Bee +Arnette +Ardelle +Annika +Amiee +Amee +Allena +Yvone +Yuki +Yoshie +Yevette +Yael +Willetta +Voncile +Venetta +Tula +Tonette +Timika +Temika +Telma +Teisha +Taren +Ta +Stacee +Shin +Shawnta +Saturnina +Ricarda +Pok +Pasty +Onie +Nubia +Mora +Mike +Marielle +Mariella +Marianela +Mardell +Many +Luanna +Loise +Lisabeth +Lindsy +Lilliana +Lilliam +Lelah +Leigha +Leanora +Lang +Kristeen +Khalilah +Keeley +Kandra +Junko +Joaquina +Jerlene +Jani +Jamika +Jame +Hsiu +Hermila +Golden +Genevive +Evia +Eugena +Emmaline +Elfreda +Elene +Donette +Delcie +Deeanna +Darcey +Cuc +Clarinda +Cira +Chae +Celinda +Catheryn +Catherin +Casimira +Carmelia +Camellia +Breana +Bobette +Bernardina +Bebe +Basilia +Arlyne +Amal +Alayna +Zonia +Zenia +Yuriko +Yaeko +Wynell +Willow +Willena +Vernia +Tu +Travis +Tora +Terrilyn +Terica +Tenesha +Tawna +Tajuana +Taina +Stephnie +Sona +Sol +Sina +Shondra +Shizuko +Sherlene +Sherice +Sharika +Rossie +Rosena +Rory +Rima +Ria +Rheba +Renna +Peter +Natalya +Nancee +Melodi +Meda +Maxima +Matha +Marketta +Maricruz +Marcelene +Malvina +Luba +Louetta +Leida +Lecia +Lauran +Lashawna +Laine +Khadijah +Katerine +Kasi +Kallie +Julietta +Jesusita +Jestine +Jessia +Jeremy +Jeffie +Janyce +Isadora +Georgianne +Fidelia +Evita +Eura +Eulah +Estefana +Elsy +Elizabet +Eladia +Dodie +Dion +Dia +Denisse +Deloras +Delila +Daysi +Dakota +Curtis +Crystle +Concha +Colby +Claretta +Chu +Christia +Charlsie +Charlena +Carylon +Bettyann +Asley +Ashlea +Amira +Ai +Agueda +Agnus +Yuette +Vinita +Victorina +Tynisha +Treena +Toccara +Tish +Thomasena +Tegan +Soila +Shiloh +Shenna +Sharmaine +Shantae +Shandi +September +Saran +Sarai +Sana +Samuel +Salley +Rosette +Rolande +Regine +Otelia +Oscar +Olevia +Nicholle +Necole +Naida +Myrta +Myesha +Mitsue +Minta +Mertie +Margy +Mahalia +Madalene +Love +Loura +Lorean +Lewis +Lesha +Leonida +Lenita +Lavone +Lashell +Lashandra +Lamonica +Kimbra +Katherina +Karry +Kanesha +Julio +Jong +Jeneva +Jaquelyn +Hwa +Gilma +Ghislaine +Gertrudis +Fransisca +Fermina +Ettie +Etsuko +Ellis +Ellan +Elidia +Edra +Dorethea +Doreatha +Denyse +Denny +Deetta +Daine +Cyrstal +Corrin +Cayla +Carlita +Camila +Burma +Bula +Buena +Blake +Barabara +Avril +Austin +Alaine +Zana +Wilhemina +Wanetta +Virgil +Vi +Veronika +Vernon +Verline +Vasiliki +Tonita +Tisa +Teofila +Tayna +Taunya +Tandra +Takako +Sunni +Suanne +Sixta +Sharell +Seema +Russell +Rosenda +Robena +Raymonde +Pei +Pamila +Ozell +Neida +Neely +Mistie +Micha +Merissa +Maurita +Maryln +Maryetta +Marshall +Marcell +Malena +Makeda +Maddie +Lovetta +Lourie +Lorrine +Lorilee +Lester +Laurena +Lashay +Larraine +Laree +Lacresha +Kristle +Krishna +Keva +Keira +Karole +Joie +Jinny +Jeannetta +Jama +Heidy +Gilberte +Gema +Faviola +Evelynn +Enda +Elli +Ellena +Divina +Dagny +Collene +Codi +Cindie +Chassidy +Chasidy +Catrice +Catherina +Cassey +Caroll +Carlena +Candra +Calista +Bryanna +Britteny +Beula +Bari +Audrie +Audria +Ardelia +Annelle +Angila +Alona +Allyn +Douglas +Roger +Jonathan +Ralph +Nicholas +Benjamin +Bruce +Harry +Wayne +Steve +Howard +Ernest +Phillip +Todd +Craig +Alan +Philip +Earl +Danny +Bryan +Stanley +Leonard +Nathan +Manuel +Rodney +Marvin +Vincent +Jeffery +Jeff +Chad +Jacob +Alfred +Bradley +Herbert +Frederick +Edwin +Don +Ricky +Randall +Barry +Bernard +Leroy +Marcus +Theodore +Clifford +Miguel +Jim +Tom +Calvin +Bill +Lloyd +Derek +Warren +Darrell +Jerome +Floyd +Alvin +Tim +Gordon +Greg +Jorge +Dustin +Pedro +Derrick +Zachary +Herman +Glen +Hector +Ricardo +Rick +Brent +Ramon +Gilbert +Marc +Reginald +Ruben +Nathaniel +Rafael +Edgar +Milton +Raul +Ben +Chester +Duane +Franklin +Brad +Ron +Roland +Arnold +Harvey +Jared +Erik +Darryl +Neil +Javier +Fernando +Clinton +Ted +Mathew +Tyrone +Darren +Lance +Kurt +Allan +Nelson +Guy +Clayton +Hugh +Max +Dwayne +Dwight +Armando +Felix +Everett +Ian +Wallace +Ken +Bob +Alfredo +Alberto +Dave +Ivan +Byron +Isaac +Morris +Clifton +Willard +Ross +Andy +Salvador +Kirk +Sergio +Seth +Kent +Terrance +Eduardo +Terrence +Enrique +Wade +Stuart +Fredrick +Arturo +Alejandro +Nick +Luther +Wendell +Jeremiah +Julius +Otis +Trevor +Oliver +Luke +Homer +Gerard +Doug +Kenny +Hubert +Lyle +Matt +Alfonso +Orlando +Rex +Carlton +Ernesto +Neal +Pablo +Lorenzo +Omar +Wilbur +Grant +Horace +Roderick +Abraham +Willis +Rickey +Andres +Cesar +Johnathan +Malcolm +Rudolph +Damon +Kelvin +Preston +Alton +Archie +Marco +Wm +Pete +Randolph +Garry +Geoffrey +Jonathon +Felipe +Gerardo +Ed +Dominic +Delbert +Colin +Guillermo +Earnest +Lucas +Benny +Spencer +Rodolfo +Myron +Edmund +Garrett +Salvatore +Cedric +Lowell +Gregg +Sherman +Wilson +Sylvester +Roosevelt +Israel +Jermaine +Forrest +Wilbert +Leland +Simon +Clark +Irving +Bryant +Owen +Rufus +Woodrow +Kristopher +Mack +Levi +Marcos +Gustavo +Jake +Lionel +Gilberto +Clint +Nicolas +Ismael +Orville +Ervin +Dewey +Al +Wilfred +Josh +Hugo +Ignacio +Caleb +Tomas +Sheldon +Erick +Stewart +Doyle +Darrel +Rogelio +Terence +Santiago +Alonzo +Elias +Bert +Elbert +Ramiro +Conrad +Noah +Grady +Phil +Cornelius +Lamar +Rolando +Clay +Percy +Dexter +Bradford +Darin +Amos +Moses +Irvin +Saul +Roman +Randal +Timmy +Darrin +Winston +Brendan +Abel +Dominick +Boyd +Emilio +Elijah +Domingo +Emmett +Marlon +Emanuel +Jerald +Edmond +Emil +Dewayne +Will +Otto +Teddy +Reynaldo +Bret +Jess +Trent +Humberto +Emmanuel +Stephan +Vicente +Lamont +Garland +Miles +Efrain +Heath +Rodger +Harley +Ethan +Eldon +Rocky +Pierre +Junior +Freddy +Eli +Bryce +Antoine +Sterling +Chase +Grover +Elton +Cleveland +Dylan +Chuck +Damian +Reuben +Stan +August +Leonardo +Jasper +Russel +Erwin +Benito +Hans +Monte +Blaine +Ernie +Curt +Quentin +Agustin +Murray +Jamal +Adolfo +Harrison +Tyson +Burton +Brady +Elliott +Wilfredo +Bart +Jarrod +Vance +Denis +Damien +Joaquin +Harlan +Desmond +Elliot +Darwin +Gregorio +Buddy +Xavier +Kermit +Roscoe +Esteban +Anton +Solomon +Scotty +Norbert +Elvin +Williams +Nolan +Rod +Quinton +Hal +Brain +Rob +Elwood +Kendrick +Darius +Moises +Fidel +Thaddeus +Cliff +Marcel +Jackson +Raphael +Bryon +Armand +Alvaro +Jeffry +Dane +Joesph +Thurman +Ned +Rusty +Monty +Fabian +Reggie +Mason +Graham +Isaiah +Vaughn +Gus +Loyd +Diego +Adolph +Norris +Millard +Rocco +Gonzalo +Derick +Rodrigo +Wiley +Rigoberto +Alphonso +Ty +Noe +Vern +Reed +Jefferson +Elvis +Bernardo +Mauricio +Hiram +Donovan +Basil +Riley +Nickolas +Maynard +Scot +Vince +Quincy +Eddy +Sebastian +Federico +Ulysses +Heriberto +Donnell +Cole +Davis +Gavin +Emery +Ward +Romeo +Jayson +Dante +Clement +Coy +Maxwell +Jarvis +Bruno +Issac +Dudley +Brock +Sanford +Carmelo +Barney +Nestor +Stefan +Donny +Art +Linwood +Beau +Weldon +Galen +Isidro +Truman +Delmar +Johnathon +Silas +Frederic +Dick +Irwin +Merlin +Charley +Marcelino +Harris +Carlo +Trenton +Kurtis +Hunter +Aurelio +Winfred +Vito +Collin +Denver +Carter +Leonel +Emory +Pasquale +Mohammad +Mariano +Danial +Landon +Dirk +Branden +Adan +Buford +German +Wilmer +Emerson +Zachery +Fletcher +Jacques +Errol +Dalton +Monroe +Josue +Edwardo +Booker +Wilford +Sonny +Shelton +Carson +Theron +Raymundo +Daren +Houston +Robby +Lincoln +Genaro +Bennett +Octavio +Cornell +Hung +Arron +Antony +Herschel +Giovanni +Garth +Cyrus +Cyril +Ronny +Lon +Freeman +Duncan +Kennith +Carmine +Erich +Chadwick +Wilburn +Russ +Reid +Myles +Anderson +Morton +Jonas +Forest +Mitchel +Mervin +Zane +Rich +Jamel +Lazaro +Alphonse +Randell +Major +Jarrett +Brooks +Abdul +Luciano +Seymour +Eugenio +Mohammed +Valentin +Chance +Arnulfo +Lucien +Ferdinand +Thad +Ezra +Aldo +Rubin +Royal +Mitch +Earle +Abe +Wyatt +Marquis +Lanny +Kareem +Jamar +Boris +Isiah +Emile +Elmo +Aron +Leopoldo +Everette +Josef +Eloy +Rodrick +Reinaldo +Lucio +Jerrod +Weston +Hershel +Barton +Parker +Lemuel +Burt +Jules +Gil +Eliseo +Ahmad +Nigel +Efren +Antwan +Alden +Margarito +Coleman +Dino +Osvaldo +Les +Deandre +Normand +Kieth +Trey +Norberto +Napoleon +Jerold +Fritz +Rosendo +Milford +Christoper +Alfonzo +Lyman +Josiah +Brant +Wilton +Rico +Jamaal +Dewitt +Brenton +Olin +Foster +Faustino +Claudio +Judson +Gino +Edgardo +Alec +Tanner +Jarred +Donn +Tad +Prince +Porfirio +Odis +Lenard +Chauncey +Tod +Mel +Marcelo +Kory +Augustus +Keven +Hilario +Bud +Sal +Orval +Mauro +Zachariah +Olen +Anibal +Milo +Jed +Dillon +Amado +Newton +Lenny +Richie +Horacio +Brice +Mohamed +Delmer +Dario +Reyes +Mac +Jonah +Jerrold +Robt +Hank +Rupert +Rolland +Kenton +Damion +Antone +Waldo +Fredric +Bradly +Kip +Burl +Walker +Tyree +Jefferey +Ahmed +Willy +Stanford +Oren +Noble +Moshe +Mikel +Enoch +Brendon +Quintin +Jamison +Florencio +Darrick +Tobias +Hassan +Giuseppe +Demarcus +Cletus +Tyrell +Lyndon +Keenan +Werner +Geraldo +Columbus +Chet +Bertram +Markus +Huey +Hilton +Dwain +Donte +Tyron +Omer +Isaias +Hipolito +Fermin +Adalberto +Bo +Barrett +Teodoro +Mckinley +Maximo +Garfield +Raleigh +Lawerence +Abram +Rashad +King +Emmitt +Daron +Samual +Miquel +Eusebio +Domenic +Darron +Buster +Wilber +Renato +Jc +Hoyt +Haywood +Ezekiel +Chas +Florentino +Elroy +Clemente +Arden +Neville +Edison +Deshawn +Nathanial +Jordon +Danilo +Claud +Sherwood +Raymon +Rayford +Cristobal +Ambrose +Titus +Hyman +Felton +Ezequiel +Erasmo +Stanton +Lonny +Len +Ike +Milan +Lino +Jarod +Herb +Andreas +Walton +Rhett +Palmer +Douglass +Cordell +Oswaldo +Ellsworth +Virgilio +Toney +Nathanael +Del +Benedict +Mose +Johnson +Isreal +Garret +Fausto +Asa +Arlen +Zack +Warner +Modesto +Francesco +Manual +Gaylord +Gaston +Filiberto +Deangelo +Michale +Granville +Wes +Malik +Zackary +Tuan +Eldridge +Cristopher +Cortez +Antione +Malcom +Long +Korey +Jospeh +Colton +Waylon +Von +Hosea +Shad +Santo +Rudolf +Rolf +Rey +Renaldo +Marcellus +Lucius +Kristofer +Boyce +Benton +Hayden +Harland +Arnoldo +Rueben +Leandro +Kraig +Jerrell +Jeromy +Hobert +Cedrick +Arlie +Winford +Wally +Luigi +Keneth +Jacinto +Graig +Franklyn +Edmundo +Sid +Porter +Leif +Jeramy +Buck +Willian +Vincenzo +Shon +Lynwood +Jere +Hai +Elden +Dorsey +Darell +Broderick +Alonso diff --git a/misc/benchmarks/various/prng_bench.cpp b/misc/benchmarks/various/prng_bench.cpp new file mode 100644 index 00000000..6f4e0e47 --- /dev/null +++ b/misc/benchmarks/various/prng_bench.cpp @@ -0,0 +1,223 @@ +#include <cstdint> +#include <iostream> +#include <ctime> +#include <random> +#include <stc/crandom.h> + +static inline uint64_t rotl64(const uint64_t x, const int k) + { return (x << k) | (x >> (64 - k)); } + +static uint64_t splitmix64_x = 87213627321ull; /* The state can be seeded with any value. */ + +uint64_t splitmix64(void) { + uint64_t z = (splitmix64_x += 0x9e3779b97f4a7c15); + z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9; + z = (z ^ (z >> 27)) * 0x94d049bb133111eb; + return z ^ (z >> 31); +} + +static void init_state(uint64_t *rng, uint64_t seed) { + splitmix64_x = seed; + for (int i=0; i<4; ++i) rng[i] = splitmix64(); +} + +/* romu_trio */ + +uint64_t romu_trio(uint64_t s[3]) { + uint64_t xp = s[0], yp = s[1], zp = s[2]; + s[0] = 15241094284759029579u * zp; + s[1] = yp - xp; s[1] = rotl64(s[1], 12); + s[2] = zp - yp; s[2] = rotl64(s[2], 44); + return xp; +} + +/* sfc64 */ + +static inline uint64_t sfc64(uint64_t s[4]) { + uint64_t result = s[0] + s[1] + s[3]++; + s[0] = s[1] ^ (s[1] >> 11); + s[1] = s[2] + (s[2] << 3); + s[2] = rotl64(s[2], 24) + result; + return result; +} + +uint32_t sfc32(uint32_t s[4]) { + uint32_t t = s[0] + s[1] + s[3]++; + s[0] = s[1] ^ (s[1] >> 9); + s[1] = s[2] + (s[2] << 3); + s[2] = ((s[2] << 21) | (s[2] >> 11)) + t; + return t; +} + +uint32_t stc32(uint32_t s[5]) { + uint32_t t = (s[0] ^ (s[3] += s[4])) + s[1]; + s[0] = s[1] ^ (s[1] >> 9); + s[1] = s[2] + (s[2] << 3); + s[2] = ((s[2] << 21) | (s[2] >> 11)) + t; + return t; +} + +uint32_t pcg32(uint32_t s[2]) { + uint64_t oldstate = s[0]; + s[0] = oldstate * 6364136223846793005ULL + (s[1]|1); + uint32_t xorshifted = ((oldstate >> 18u) ^ oldstate) >> 27u; + uint32_t rot = oldstate >> 59u; + return (xorshifted >> rot) | (xorshifted << ((-rot) & 31)); +} + + +/* xoshiro128+ */ + +uint64_t xoroshiro128plus(uint64_t s[2]) { + const uint64_t s0 = s[0]; + uint64_t s1 = s[1]; + const uint64_t result = s0 + s1; + + s1 ^= s0; + s[0] = rotl64(s0, 24) ^ s1 ^ (s1 << 16); // a, b + s[1] = rotl64(s1, 37); // c + + return result; +} + + +/* xoshiro256** */ + +static inline uint64_t xoshiro256starstar(uint64_t s[4]) { + const uint64_t result = rotl64(s[1] * 5, 7) * 9; + const uint64_t t = s[1] << 17; + s[2] ^= s[0]; + s[3] ^= s[1]; + s[1] ^= s[2]; + s[0] ^= s[3]; + s[2] ^= t; + s[3] = rotl64(s[3], 45); + return result; +} + +// wyrand - 2020-12-07 +static inline void _wymum(uint64_t *A, uint64_t *B){ +#if defined(__SIZEOF_INT128__) + __uint128_t r = *A; r *= *B; + *A = (uint64_t) r; *B = (uint64_t ) (r >> 64); +#elif defined(_MSC_VER) && defined(_M_X64) + *A = _umul128(*A, *B, B); +#else + uint64_t ha=*A>>32, hb=*B>>32, la=(uint32_t)*A, lb=(uint32_t)*B, hi, lo; + uint64_t rh=ha*hb, rm0=ha*lb, rm1=hb*la, rl=la*lb, t=rl+(rm0<<32), c=t<rl; + lo=t+(rm1<<32); c+=lo<t; hi=rh+(rm0>>32)+(rm1>>32)+c; + *A=lo; *B=hi; +#endif +} +static inline uint64_t _wymix(uint64_t A, uint64_t B){ + _wymum(&A,&B); return A^B; +} +static inline uint64_t wyrand64(uint64_t *seed){ + static const uint64_t _wyp[] = {0xa0761d6478bd642full, 0xe7037ed1a0b428dbull}; + *seed+=_wyp[0]; return _wymix(*seed,*seed^_wyp[1]); +} + + +using namespace std; + +int main(void) +{ + enum {N = 2000000000}; + uint16_t* recipient = new uint16_t[N]; + static stc64_t rng; + init_state(rng.state, 12345123); + std::mt19937 mt(12345123); + + cout << "WARMUP" << endl; + for (size_t i = 0; i < N; i++) + recipient[i] = wyrand64(rng.state); + + clock_t beg, end; + for (size_t ti = 0; ti < 2; ti++) { + init_state(rng.state, 12345123); + cout << endl << "ROUND " << ti+1 << " ---------" << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = romu_trio(rng.state); + end = clock(); + cout << "romu_trio:\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = wyrand64(rng.state); + end = clock(); + cout << "wyrand64:\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = sfc32((uint32_t *)rng.state); + end = clock(); + cout << "sfc32:\t\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = stc32((uint32_t *)rng.state); + end = clock(); + cout << "stc32:\t\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = pcg32((uint32_t *)rng.state); + end = clock(); + cout << "pcg32:\t\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = sfc64(rng.state); + end = clock(); + cout << "sfc64:\t\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = stc64_rand(&rng); + end = clock(); + cout << "stc64:\t\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = xoroshiro128plus(rng.state); + end = clock(); + cout << "xoroshiro128+:\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = xoshiro256starstar(rng.state); + end = clock(); + cout << "xoshiro256**:\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + + beg = clock(); + for (size_t i = 0; i < N; i++) + recipient[i] = mt(); + end = clock(); + cout << "std::mt19937:\t" + << (float(end - beg) / CLOCKS_PER_SEC) + << "s: " << recipient[312] << endl; + } + delete[] recipient; + return 0; +} diff --git a/misc/benchmarks/various/rust_cmap.c b/misc/benchmarks/various/rust_cmap.c new file mode 100644 index 00000000..83b7dd19 --- /dev/null +++ b/misc/benchmarks/various/rust_cmap.c @@ -0,0 +1,61 @@ +#include <time.h> +#include <stdio.h> +#define i_key uint64_t +#define i_val uint64_t +#define i_tag u64 +#define i_max_load_factor 0.8f +#include <stc/cmap.h> + +uint64_t romu_rotl(uint64_t val, uint32_t r) { + return (val << r) | (val >> (64 - r)); +} + +uint64_t romu_trio(uint64_t s[3]) { + const uint64_t xp = s[0], + yp = s[1], + zp = s[2]; + s[0] = 15241094284759029579u * zp; + s[1] = yp - xp; + s[1] = romu_rotl(s[1], 12); + s[2] = zp - yp; + s[2] = romu_rotl(s[2], 44); + return xp; +} + +int main() +{ + c_auto (cmap_u64, m) { + const size_t n = 50000000, + mask = (1 << 25) - 1, + ms = CLOCKS_PER_SEC/1000; + cmap_u64_reserve(&m, n); + printf("STC cmap n = %" c_ZU ", mask = 0x%" PRIxMAX "\n", n, mask); + + uint64_t rng[3] = {1872361123, 123879177, 87739234}, sum; + clock_t now = clock(); + c_forrange (n) { + uint64_t key = romu_trio(rng) & mask; + cmap_u64_insert(&m, key, 0).ref->second += 1; + } + printf("insert : %" c_ZU "ms \tsize : %" c_ZU "\n", (clock() - now)/ms, cmap_u64_size(&m)); + + now = clock(); + sum = 0; + c_forrange (key, mask + 1) { sum += cmap_u64_contains(&m, key); } + printf("lookup : %" c_ZU "ms \tsum : %" c_ZU "\n", (clock() - now)/ms, sum); + + now = clock(); + sum = 0; + c_foreach (i, cmap_u64, m) { sum += i.ref->second; } + printf("iterate : %" c_ZU "ms \tsum : %" c_ZU "\n", (clock() - now)/ms, sum); + + uint64_t rng2[3] = {1872361123, 123879177, 87739234}; + now = clock(); + c_forrange (n) { + uint64_t key = romu_trio(rng2) & mask; + cmap_u64_erase(&m, key); + } + printf("remove : %" c_ZU "ms \tsize : %" c_ZU "\n", (clock() - now)/ms, cmap_u64_size(&m)); + printf("press a key:\n"); getchar(); + } +} diff --git a/misc/benchmarks/various/rust_hashmap.rs b/misc/benchmarks/various/rust_hashmap.rs new file mode 100644 index 00000000..5394a7c3 --- /dev/null +++ b/misc/benchmarks/various/rust_hashmap.rs @@ -0,0 +1,82 @@ +use std::{ + hash::{BuildHasherDefault, Hasher}, + io::Read, + time::Instant, +}; + +struct MyHasher { + seed: u64, +} + +impl Default for MyHasher { + fn default() -> Self { + Self { seed: 0xb5ad4eceda1ce2a9_u64 } + } +} + +impl Hasher for MyHasher { + fn write(&mut self, bytes: &[u8]) { + use std::convert::TryInto; + self.seed = u64::from_ne_bytes(bytes.try_into().unwrap()).wrapping_mul(0xc6a4a7935bd1e99d); + } + + #[inline] + fn write_u64(&mut self, i: u64) { + self.seed = i.wrapping_mul(0xc6a4a7935bd1e99d); + } + + #[inline] + fn finish(&self) -> u64 { + self.seed + } +} + +type MyBuildHasher = BuildHasherDefault<MyHasher>; + +fn romu_trio(s: &mut [u64]) -> u64 { + let xp = s[0]; + let yp = s[1]; + let zp = s[2]; + s[0] = 15241094284759029579_u64.wrapping_mul(zp); + s[1] = yp.wrapping_sub(xp); + s[1] = s[1].rotate_left(12); + s[2] = zp.wrapping_sub(yp); + s[2] = s[2].rotate_left(44); + return xp; +} + +fn main() { + let n = 50_000_000; + let mask = (1 << 25) - 1; + + let mut m = std::collections::HashMap::<u64, u64, MyBuildHasher>::default(); + m.reserve(n); + + let mut rng: [u64; 3] = [1872361123, 123879177, 87739234]; + println!("Rust HashMap n = {}, mask = {:#x}", n, mask); + let now = Instant::now(); + for _i in 0..n { + let key: u64 = romu_trio(&mut rng) & mask; + *m.entry(key).or_insert(0) += 1; + } + println!("insert : {}ms \tsize : {}", now.elapsed().as_millis(), m.len()); + let now = Instant::now(); + let mut sum = 0; + for i in 0..mask + 1 { if m.contains_key(&i) { sum += 1; }} + println!("lookup : {}ms \tsum : {}", now.elapsed().as_millis(), sum); + + let now = Instant::now(); + let mut sum = 0; + for (_, value) in &m { sum += value; } + println!("iterate : {}ms \tsum : {}", now.elapsed().as_millis(), sum); + + let mut rng: [u64; 3] = [1872361123, 123879177, 87739234]; + let now = Instant::now(); + for _ in 0..n { + let key: u64 = romu_trio(&mut rng) & mask; + m.remove(&key); + } + println!("remove : {}ms \tsize : {}", now.elapsed().as_millis(), m.len()); + println!("press a key:"); + std::io::stdin().bytes().next(); +}
\ No newline at end of file diff --git a/misc/benchmarks/various/sso_bench.cpp b/misc/benchmarks/various/sso_bench.cpp new file mode 100644 index 00000000..0fffef7a --- /dev/null +++ b/misc/benchmarks/various/sso_bench.cpp @@ -0,0 +1,135 @@ +#include <string> +#include <iostream> +#include <chrono> + +#include <stc/crandom.h> +#include <stc/cstr.h> + +#define i_type StcVec +#define i_val_str +#include <stc/cstack.h> + +#define i_type StcSet +#define i_val_str +#include <stc/csset.h> + +#include <vector> +using StdVec = std::vector<std::string>; +#include <set> +using StdSet = std::set<std::string>; + + +static const int BENCHMARK_SIZE = 2000000; +static const int MAX_STRING_SIZE = 50; +static const char CHARS[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=+-"; +using time_point = std::chrono::high_resolution_clock::time_point; + + +static inline std::string randomString_STD(int strsize) { + std::string s(strsize, 0); + char* p = &s[0]; + union { uint64_t u8; uint8_t b[8]; } r; + for (int i = 0; i < strsize; ++i) { + if ((i & 7) == 0) r.u8 = crandom() & 0x3f3f3f3f3f3f3f3f; + p[i] = CHARS[r.b[i & 7]]; + } + return s; +} + +static inline cstr randomString_STC(int strsize) { + cstr s = cstr_with_size(strsize, 0); + char* p = cstr_data(&s); + union { uint64_t u8; uint8_t b[8]; } r; + for (int i = 0; i < strsize; ++i) { + if ((i & 7) == 0) r.u8 = crandom() & 0x3f3f3f3f3f3f3f3f; + p[i] = CHARS[r.b[i & 7]]; + } + return s; +} + + +void addRandomString(StdVec& vec, int strsize) { + vec.push_back(std::move(randomString_STD(strsize))); +} + +void addRandomString(StcVec& vec, int strsize) { + StcVec_push(&vec, randomString_STC(strsize)); +} + +void addRandomString(StdSet& set, int strsize) { + set.insert(std::move(randomString_STD(strsize))); +} + +void addRandomString(StcSet& set, int strsize) { + StcSet_insert(&set, randomString_STC(strsize)); +} + + +template <class C> +int benchmark(C& container, const int n, const int strsize) { + time_point t1 = std::chrono::high_resolution_clock::now(); + + for (int i = 0; i < n; i++) + addRandomString(container, strsize); + + time_point t2 = std::chrono::high_resolution_clock::now(); + const auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count(); + std::cerr << (strsize ? strsize : 32) << "\t" << duration; + return (int)duration; +} + + +int main() { + uint64_t seed = 4321; + int sum, n; + + // VECTOR WITH STRINGS + + csrandom(seed); + sum = 0, n = 0; + std::cerr << "\nstrsize\tmsecs\tstd::vector<std::string>, size=" << BENCHMARK_SIZE << "\n"; + for (int strsize = 1; strsize <= MAX_STRING_SIZE; strsize += 2) { + StdVec vec; vec.reserve(BENCHMARK_SIZE); + sum += benchmark(vec, BENCHMARK_SIZE, strsize), ++n; + std::cout << '\t' << vec.front() << '\n'; + } + std::cout << "Avg:\t" << sum/n << '\n'; + + csrandom(seed); + sum = 0, n = 0; + std::cerr << "\nstrsize\tmsecs\tcvec<cstr>, size=" << BENCHMARK_SIZE << "\n"; + for (int strsize = 1; strsize <= MAX_STRING_SIZE; strsize += 2) { + StcVec vec = StcVec_with_capacity(BENCHMARK_SIZE); + sum += benchmark(vec, BENCHMARK_SIZE, strsize), ++n; + std::cout << '\t' << cstr_str(&vec.data[0]) << '\n'; + StcVec_drop(&vec); + } + std::cout << "Avg:\t" << sum/n << '\n'; + + // SORTED SET WITH STRINGS + + csrandom(seed); + sum = 0, n = 0; + std::cerr << "\nstrsize\tmsecs\tstd::set<std::string>, size=" << BENCHMARK_SIZE/16 << "\n"; + for (int strsize = 1; strsize <= MAX_STRING_SIZE; strsize += 2) { + StdSet set; + sum += benchmark(set, BENCHMARK_SIZE/16, strsize), ++n; + std::cout << '\t' << *set.begin() << '\n'; + } + std::cout << "Avg:\t" << sum/n << '\n'; + + csrandom(seed); + sum = 0, n = 0; + std::cerr << "\nstrsize\tmsecs\tcsset<cstr>, size=" << BENCHMARK_SIZE/16 << "\n"; + for (int strsize = 1; strsize <= MAX_STRING_SIZE; strsize += 2) { + StcSet set = StcSet_with_capacity(BENCHMARK_SIZE/16); + sum += benchmark(set, BENCHMARK_SIZE/16, strsize), ++n; + std::cout << '\t' << cstr_str(StcSet_front(&set)) << '\n'; + StcSet_drop(&set); + } + std::cout << "Avg:\t" << sum/n << '\n'; + + std::cerr << "sizeof(std::string) : " << sizeof(std::string) << std::endl + << "sizeof(cstr) : " << sizeof(cstr) << std::endl; + return 0; +} diff --git a/misc/benchmarks/various/string_bench_STC.cpp b/misc/benchmarks/various/string_bench_STC.cpp new file mode 100644 index 00000000..ae8e4c38 --- /dev/null +++ b/misc/benchmarks/various/string_bench_STC.cpp @@ -0,0 +1,300 @@ +// https://www.codeproject.com/Tips/5255442/Cplusplus14-20-Heterogeneous-Lookup-Benchmark +// https://github.com/shaovoon/cpp_hetero_lookup_bench + +#include <iostream> +#include <iomanip> +#include <chrono> +#define i_static +#include <stc/cstr.h> // string +#define i_static +#include <stc/csview.h> // string_view + +#define i_key_str +#include <stc/cvec.h> // vec of cstr with const char* lookup + +#define i_type cvec_sv // override default type name (cvec_csview) +#define i_key csview +#define i_cmp csview_cmp +#include <stc/cvec.h> // cvec_vs: vec of csview + +#define i_key_str +#define i_val size_t +#include <stc/csmap.h> // sorted map of cstr, const char* lookup + +#define i_key_ssv +#define i_val size_t +#include <stc/csmap.h> // sorted map of cstr, csview lookup + +#define i_key_str +#define i_val size_t +#include <stc/cmap.h> // unordered map of cstr, const char* lookup + +#define i_key_ssv +#define i_val size_t +#include <stc/cmap.h> // unordered map of cstr, csview lookup + + +cvec_str read_file(const char* name) +{ + cvec_str data = cvec_str_init(); + c_auto (cstr, line) + c_with (FILE* f = fopen(name, "r"), fclose(f)) + while (cstr_getline(&line, f)) + cvec_str_emplace_back(&data, cstr_str(&line)); + return data; +} + +class timer +{ +public: + timer() = default; + void start(const std::string& text_) + { + text = text_; + begin = std::chrono::high_resolution_clock::now(); + } + void stop() + { + auto end = std::chrono::high_resolution_clock::now(); + auto dur = end - begin; + auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(dur).count(); + std::cout << std::setw(32) << text << " timing:" << std::setw(5) << ms << "ms" << std::endl; + } + +private: + std::string text; + std::chrono::high_resolution_clock::time_point begin; +}; + +void initShortStringVec(cvec_str* vs, cvec_sv* vsv) +{ + cvec_str_drop(vs); + cvec_sv_clear(vsv); + + *vs = read_file("names.txt"); +/* + cvec_str_emplace_back(vs, "Susan"); + cvec_str_emplace_back(vs, "Jason"); + cvec_str_emplace_back(vs, "Lily"); + cvec_str_emplace_back(vs, "Michael"); + cvec_str_emplace_back(vs, "Mary"); + + cvec_str_emplace_back(vs, "Jerry"); + cvec_str_emplace_back(vs, "Jenny"); + cvec_str_emplace_back(vs, "Klaus"); + cvec_str_emplace_back(vs, "Celine"); + cvec_str_emplace_back(vs, "Kenny"); + + cvec_str_emplace_back(vs, "Kelly"); + cvec_str_emplace_back(vs, "Jackson"); + cvec_str_emplace_back(vs, "Mandy"); + cvec_str_emplace_back(vs, "Terry"); + cvec_str_emplace_back(vs, "Sandy"); + + cvec_str_emplace_back(vs, "Billy"); + cvec_str_emplace_back(vs, "Cindy"); + cvec_str_emplace_back(vs, "Phil"); + cvec_str_emplace_back(vs, "Lindy"); + cvec_str_emplace_back(vs, "David"); +*/ + size_t num = 0; + c_foreach (i, cvec_str, *vs) + { + cvec_sv_push_back(vsv, cstr_sv(i.ref)); + num += cstr_size(i.ref); + } + std::cout << "num strings: " << cvec_sv_size(vsv) << std::endl; + std::cout << "avg str len: " << num / (float)cvec_sv_size(vsv) << std::endl; +} + +void initLongStringVec(cvec_str* vs, cvec_sv* vsv) +{ + cvec_str_drop(vs); + cvec_sv_clear(vsv); + + *vs = read_file("names.txt"); + c_foreach (i, cvec_str, *vs) { + cstr_append_s(i.ref, *i.ref); + cstr_append_s(i.ref, *i.ref); + cstr_append_s(i.ref, *i.ref); + } +/* + cvec_str_emplace_back(vs, "Susan Susan Susan Susan Susan Susan"); + cvec_str_emplace_back(vs, "Jason Jason Jason Jason Jason Jason"); + cvec_str_emplace_back(vs, "Lily Lily Lily Lily Lily Lily"); + cvec_str_emplace_back(vs, "Michael Michael Michael Michael Michael Michael"); + cvec_str_emplace_back(vs, "Mary Mary Mary Mary Mary Mary"); + + cvec_str_emplace_back(vs, "Jerry Jerry Jerry Jerry Jerry Jerry"); + cvec_str_emplace_back(vs, "Jenny Jenny Jenny Jenny Jenny Jenny"); + cvec_str_emplace_back(vs, "Klaus Klaus Klaus Klaus Klaus Klaus"); + cvec_str_emplace_back(vs, "Celine Celine Celine Celine Celine Celine"); + cvec_str_emplace_back(vs, "Kenny Kenny Kenny Kenny Kenny Kenny"); + + cvec_str_emplace_back(vs, "Kelly Kelly Kelly Kelly Kelly Kelly"); + cvec_str_emplace_back(vs, "Jackson Jackson Jackson Jackson Jackson Jackson"); + cvec_str_emplace_back(vs, "Mandy Mandy Mandy Mandy Mandy Mandy"); + cvec_str_emplace_back(vs, "Terry Terry Terry Terry Terry Terry"); + cvec_str_emplace_back(vs, "Sandy Sandy Sandy Sandy Sandy Sandy"); + + cvec_str_emplace_back(vs, "Billy Billy Billy Billy Billy Billy"); + cvec_str_emplace_back(vs, "Cindy Cindy Cindy Cindy Cindy Cindy"); + cvec_str_emplace_back(vs, "Phil Phil Phil Phil Phil Phil"); + cvec_str_emplace_back(vs, "Lindy Lindy Lindy Lindy Lindy Lindy"); + cvec_str_emplace_back(vs, "David David David David David David"); +*/ + size_t num = 0; + c_foreach (i, cvec_str, *vs) + { + cvec_sv_push_back(vsv, cstr_sv(i.ref)); + num += cstr_size(i.ref); + } + std::cout << "num strings: " << cvec_sv_size(vsv) << std::endl; + std::cout << "avg str len: " << num / (float)cvec_sv_size(vsv) << std::endl; +} + +void initMaps(const cvec_str* vs, csmap_str* mapTrans, csmap_ssv* mapSview, + cmap_str* unordmapTrans, cmap_ssv* unordmapSview) +{ + csmap_str_clear(mapTrans); + csmap_ssv_clear(mapSview); + cmap_str_clear(unordmapTrans); + cmap_ssv_clear(unordmapSview); + + size_t n = 0; + c_foreach (i, cvec_str, *vs) + { + csmap_str_insert(mapTrans, cstr_clone(*i.ref), n); + csmap_ssv_insert(mapSview, cstr_clone(*i.ref), n); + cmap_str_insert(unordmapTrans, cstr_clone(*i.ref), n); + cmap_ssv_insert(unordmapSview, cstr_clone(*i.ref), n); + ++n; + } +} + +void benchmark( + const cvec_str* vec_string, + const cvec_sv* vec_stringview, + const csmap_str* mapTrans, + const csmap_ssv* mapSview, + const cmap_str* unordmapTrans, + const cmap_ssv* unordmapSview); + +//const size_t MAX_LOOP = 1000000; +const size_t MAX_LOOP = 2000; + +int main() +{ + c_auto (cvec_str, vec_string) + c_auto (cvec_sv, vec_stringview) + c_auto (csmap_str, mapTrans) + c_auto (csmap_ssv, mapSview) + c_auto (cmap_str, unordmapTrans) + c_auto (cmap_ssv, unordmapSview) + { + std::cout << "Short String Benchmark" << std::endl; + std::cout << "======================" << std::endl; + + initShortStringVec(&vec_string, &vec_stringview); + initMaps(&vec_string, &mapTrans, &mapSview, + &unordmapTrans, &unordmapSview); + + for (int i=0; i<3; ++i) + benchmark( + &vec_string, + &vec_stringview, + &mapTrans, + &mapSview, + &unordmapTrans, + &unordmapSview); + + std::cout << "Long String Benchmark" << std::endl; + std::cout << "=====================" << std::endl; + + initLongStringVec(&vec_string, &vec_stringview); + initMaps(&vec_string, &mapTrans, &mapSview, + &unordmapTrans, &unordmapSview); + for (int i=0; i<3; ++i) + benchmark( + &vec_string, + &vec_stringview, + &mapTrans, + &mapSview, + &unordmapTrans, + &unordmapSview); + } + return 0; +} + +void benchmark( + const cvec_str* vec_string, + const cvec_sv* vec_stringview, + const csmap_str* mapTrans, + const csmap_ssv* mapSview, + const cmap_str* unordmapTrans, + const cmap_ssv* unordmapSview) +{ + size_t grandtotal = 0; + + size_t total = 0; + + timer stopwatch; + total = 0; + stopwatch.start("Trans Map with char*"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + c_foreach (j, cvec_str, *vec_string) + { + const csmap_str_value* v = csmap_str_get(mapTrans, cstr_str(j.ref)); + if (v) + total += v->second; + } + } + grandtotal += total; + stopwatch.stop(); + + total = 0; + stopwatch.start("Trans Map with string_view"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + c_foreach (j, cvec_sv, *vec_stringview) + { + const csmap_ssv_value* v = csmap_ssv_get(mapSview, *j.ref); + if (v) + total += v->second; + } + } + grandtotal += total; + stopwatch.stop(); + + total = 0; + stopwatch.start("Trans Unord Map with char*"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + c_foreach (j, cvec_str, *vec_string) + { + const cmap_str_value* v = cmap_str_get(unordmapTrans, cstr_str(j.ref)); + if (v) + total += v->second; + } + } + grandtotal += total; + stopwatch.stop(); + + total = 0; + stopwatch.start("Trans Unord Map with string_view"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + c_foreach (j, cvec_sv, *vec_stringview) + { + const cmap_ssv_value* v = cmap_ssv_get(unordmapSview, *j.ref); + if (v) + total += v->second; + } + } + grandtotal += total; + stopwatch.stop(); + + std::cout << "grandtotal:" << grandtotal << " <--- Ignore this\n" << std::endl; + +} diff --git a/misc/benchmarks/various/string_bench_STD.cpp b/misc/benchmarks/various/string_bench_STD.cpp new file mode 100644 index 00000000..8bb87937 --- /dev/null +++ b/misc/benchmarks/various/string_bench_STD.cpp @@ -0,0 +1,371 @@ +// https://www.codeproject.com/Tips/5255442/Cplusplus14-20-Heterogeneous-Lookup-Benchmark +// https://github.com/shaovoon/cpp_hetero_lookup_bench +// Requires c++20, e.g. g++ -std=c++20 + +#include <iostream> +#include <iomanip> +#include <chrono> +#include <string> +#include <string_view> +#include <vector> +#include <map> +#include <unordered_map> +#define i_static +#include <stc/cstr.h> + +std::vector<std::string> read_file(const char* name) +{ + std::vector<std::string> data; + c_auto (cstr, line) + c_with (FILE* f = fopen(name, "r"), fclose(f)) + while (cstr_getline(&line, f)) + data.emplace_back(cstr_str(&line)); + return data; +} + +class timer +{ +public: + timer() = default; + void start(const std::string& text_) + { + text = text_; + begin = std::chrono::high_resolution_clock::now(); + } + void stop() + { + auto end = std::chrono::high_resolution_clock::now(); + auto dur = end - begin; + auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(dur).count(); + std::cout << std::setw(32) << text << " timing:" << std::setw(5) << ms << "ms" << std::endl; + } + +private: + std::string text; + std::chrono::high_resolution_clock::time_point begin; +}; + +void initShortStringVec(std::vector<std::string>& vs, std::vector<std::string_view>& vsv) +{ + vs.clear(); + vsv.clear(); + + vs = read_file("names.txt"); +/* + vs.push_back("Susan"); + vs.push_back("Jason"); + vs.push_back("Lily"); + vs.push_back("Michael"); + vs.push_back("Mary"); + + vs.push_back("Jerry"); + vs.push_back("Jenny"); + vs.push_back("Klaus"); + vs.push_back("Celine"); + vs.push_back("Kenny"); + + vs.push_back("Kelly"); + vs.push_back("Jackson"); + vs.push_back("Mandy"); + vs.push_back("Terry"); + vs.push_back("Sandy"); + + vs.push_back("Billy"); + vs.push_back("Cindy"); + vs.push_back("Phil"); + vs.push_back("Lindy"); + vs.push_back("David"); +*/ + size_t num = 0; + for (size_t i = 0; i < vs.size(); ++i) + { + vsv.push_back(vs.at(i)); + num += vs.at(i).size(); + } + std::cout << "num strings: " << vsv.size() << std::endl; + std::cout << "avg str len: " << num / (float)vsv.size() << std::endl; +} + +void initLongStringVec(std::vector<std::string>& vs, std::vector<std::string_view>& vsv) +{ + vs.clear(); + vsv.clear(); + + vs = read_file("names.txt"); + for (size_t i = 1; i < vs.size(); ++i) { + vs[i] += vs[i]; + vs[i] += vs[i]; + vs[i] += vs[i]; + } +/* + vs.push_back("Susan Susan Susan Susan Susan Susan"); + vs.push_back("Jason Jason Jason Jason Jason Jason"); + vs.push_back("Lily Lily Lily Lily Lily Lily"); + vs.push_back("Michael Michael Michael Michael Michael Michael"); + vs.push_back("Mary Mary Mary Mary Mary Mary"); + + vs.push_back("Jerry Jerry Jerry Jerry Jerry Jerry"); + vs.push_back("Jenny Jenny Jenny Jenny Jenny Jenny"); + vs.push_back("Klaus Klaus Klaus Klaus Klaus Klaus"); + vs.push_back("Celine Celine Celine Celine Celine Celine"); + vs.push_back("Kenny Kenny Kenny Kenny Kenny Kenny"); + + vs.push_back("Kelly Kelly Kelly Kelly Kelly Kelly"); + vs.push_back("Jackson Jackson Jackson Jackson Jackson Jackson"); + vs.push_back("Mandy Mandy Mandy Mandy Mandy Mandy"); + vs.push_back("Terry Terry Terry Terry Terry Terry"); + vs.push_back("Sandy Sandy Sandy Sandy Sandy Sandy"); + + vs.push_back("Billy Billy Billy Billy Billy Billy"); + vs.push_back("Cindy Cindy Cindy Cindy Cindy Cindy"); + vs.push_back("Phil Phil Phil Phil Phil Phil"); + vs.push_back("Lindy Lindy Lindy Lindy Lindy Lindy"); + vs.push_back("David David David David David David"); +*/ + size_t num = 0; + for (size_t i = 0; i < vs.size(); ++i) + { + vsv.push_back(vs.at(i)); + num += vs.at(i).size(); + } + std::cout << "num strings: " << vsv.size() << std::endl; + std::cout << "avg str len: " << num / (float)vsv.size() << std::endl; +} + +void initMapNormal(const std::vector<std::string>& vs, std::map<std::string, size_t>& mapNormal) +{ + mapNormal.clear(); + for (size_t i = 0; i < vs.size(); ++i) + { + mapNormal.insert(std::make_pair(vs.at(i), i)); + } +} + +void initMapTrans(const std::vector<std::string>& vs, std::map<std::string, size_t, std::less<> >& mapTrans) +{ + mapTrans.clear(); + for (size_t i = 0; i < vs.size(); ++i) + { + mapTrans.insert(std::make_pair(vs.at(i), i)); + } +} + +struct MyEqual : public std::equal_to<> +{ + using is_transparent = void; +}; + +struct string_hash { + using is_transparent = void; + using key_equal = std::equal_to<>; // Pred to use + using hash_type = std::hash<std::string_view>; // just a helper local type + size_t operator()(std::string_view txt) const { return hash_type{}(txt); } + size_t operator()(const std::string& txt) const { return hash_type{}(txt); } + size_t operator()(const char* txt) const { return hash_type{}(txt); } +}; + +void initUnorderedMapNormal(const std::vector<std::string>& vs, std::unordered_map<std::string, size_t>& unordmapNormal) +{ + unordmapNormal.clear(); + for (size_t i = 0; i < vs.size(); ++i) + { + unordmapNormal.insert(std::make_pair(vs.at(i), i)); + } +} + +void initUnorderedMapTrans(const std::vector<std::string>& vs, std::unordered_map<std::string, size_t, string_hash, MyEqual>& unordmapTrans) +{ + unordmapTrans.clear(); + for (size_t i = 0; i < vs.size(); ++i) + { + unordmapTrans.insert(std::make_pair(vs.at(i), i)); + } +} + +void benchmark( + const std::vector<std::string>& vec_shortstr, + const std::vector<std::string_view>& vec_shortstrview, + const std::map<std::string, size_t>& mapNormal, + const std::map<std::string, size_t, std::less<> >& mapTrans, + const std::unordered_map<std::string, size_t>& unordmapNormal, + const std::unordered_map<std::string, size_t, string_hash, MyEqual>& unordmapTrans); + +//const size_t MAX_LOOP = 1000000; +const size_t MAX_LOOP = 2000; + +int main() +{ + std::vector<std::string> vec_shortstr; + std::vector<std::string_view> vec_shortstrview; + + std::map<std::string, size_t> mapNormal; + std::map<std::string, size_t, std::less<> > mapTrans; + initShortStringVec(vec_shortstr, vec_shortstrview); + initMapNormal(vec_shortstr, mapNormal); + initMapTrans(vec_shortstr, mapTrans); + + std::unordered_map<std::string, size_t> unordmapNormal; + std::unordered_map<std::string, size_t, string_hash, MyEqual> unordmapTrans; + initUnorderedMapNormal(vec_shortstr, unordmapNormal); + initUnorderedMapTrans(vec_shortstr, unordmapTrans); + + std::cout << "Short String Benchmark" << std::endl; + std::cout << "======================" << std::endl; + + for (int i=0; i<3; ++i) benchmark( + vec_shortstr, + vec_shortstrview, + mapNormal, + mapTrans, + unordmapNormal, + unordmapTrans); + + std::cout << "Long String Benchmark" << std::endl; + std::cout << "=====================" << std::endl; + + initLongStringVec(vec_shortstr, vec_shortstrview); + initMapNormal(vec_shortstr, mapNormal); + initMapTrans(vec_shortstr, mapTrans); + + initUnorderedMapNormal(vec_shortstr, unordmapNormal); + initUnorderedMapTrans(vec_shortstr, unordmapTrans); + + for (int i=0; i<3; ++i) benchmark( + vec_shortstr, + vec_shortstrview, + mapNormal, + mapTrans, + unordmapNormal, + unordmapTrans); + + return 0; +} + +void benchmark( + const std::vector<std::string>& vec_shortstr, + const std::vector<std::string_view>& vec_shortstrview, + const std::map<std::string, size_t>& mapNormal, + const std::map<std::string, size_t, std::less<> >& mapTrans, + const std::unordered_map<std::string, size_t>& unordmapNormal, + const std::unordered_map<std::string, size_t, string_hash, MyEqual>& unordmapTrans) +{ + size_t grandtotal = 0; + size_t total = 0; + timer stopwatch; +/* + total = 0; + stopwatch.start("Normal Map with string"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstr.size(); ++j) + { + const auto& it = mapNormal.find(vec_shortstr[j]); + if(it!=mapNormal.cend()) + total += it->second; + } + } + grandtotal += total; + stopwatch.stop(); + + total = 0; + stopwatch.start("Normal Map with char*"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstr.size(); ++j) + { + const auto& it = mapNormal.find(vec_shortstr[j].c_str()); + if (it != mapNormal.cend()) + total += it->second; + } + } + grandtotal += total; + stopwatch.stop(); +*/ + total = 0; + stopwatch.start("Trans Map with char*"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstr.size(); ++j) + { + const auto& it = mapTrans.find(vec_shortstr[j].c_str()); + if (it != mapTrans.cend()) + total += it->second; + } + } + grandtotal += total; + stopwatch.stop(); + + total = 0; + stopwatch.start("Trans Map with string_view"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstrview.size(); ++j) + { + const auto& it = mapTrans.find(vec_shortstrview[j]); + if (it != mapTrans.cend()) + total += it->second; + } + } + grandtotal += total; + stopwatch.stop(); +/* + total = 0; + stopwatch.start("Normal Unord Map with string"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstr.size(); ++j) + { + const auto& it = unordmapNormal.find(vec_shortstr[j]); + if (it != unordmapNormal.cend()) + total += it->second; + } + } + grandtotal += total; + stopwatch.stop(); + + total = 0; + stopwatch.start("Normal Unord Map with char*"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstr.size(); ++j) + { + const auto& it = unordmapNormal.find(vec_shortstr[j].c_str()); + if (it != unordmapNormal.cend()) + total += it->second; + } + } + grandtotal += total; + stopwatch.stop(); +*/ + total = 0; + stopwatch.start("Trans Unord Map with char*"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstr.size(); ++j) + { + const auto& it = unordmapTrans.find(vec_shortstr[j].c_str()); + if (it != unordmapTrans.cend()) + total += it->second; + } + } + grandtotal += total; + stopwatch.stop(); + + total = 0; + stopwatch.start("Trans Unord Map with string_view"); + for (size_t i = 0; i < MAX_LOOP; ++i) + { + for (size_t j = 0; j < vec_shortstrview.size(); ++j) + { + const auto& it = unordmapTrans.find(vec_shortstrview[j]); + if (it != unordmapTrans.cend()) + total += it->second; + } + } + grandtotal += total; + + stopwatch.stop(); + + std::cout << "grandtotal:" << grandtotal << " <--- Ignore this\n" << std::endl; + +} |
