diff --git a/Cargo.lock b/Cargo.lock index d4f759aed0..2143b78641 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -380,12 +380,15 @@ dependencies = [ "itertools 0.12.1", "lazy_static", "lazycell", + "log", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", "syn 2.0.60", + "which 4.4.2", ] [[package]] @@ -2008,6 +2011,41 @@ dependencies = [ "want", ] +[[package]] +name = "iai-callgrind" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99bf26f496b13ac6273014f40afda46a233fbfb0289ce50fb4daaad2f2ffc80" +dependencies = [ + "bincode", + "bindgen", + "cc", + "iai-callgrind-macros", + "iai-callgrind-runner", + "regex", +] + +[[package]] +name = "iai-callgrind-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2a4bb39225592c0a28cfca6f70af52ebd8da23f533c2cdd0a3329c1fa252d56" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "iai-callgrind-runner" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c23a951b9eccaa1e38556d27473d1462a9c247a27961812edcaac156af861282" +dependencies = [ + "serde", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -2874,6 +2912,7 @@ dependencies = [ "crossterm", "ctrlc", "dirs-next", + "iai-callgrind", "log", "miette", "mimalloc", @@ -2951,7 +2990,7 @@ dependencies = [ "tempfile", "unicode-segmentation", "uuid", - "which", + "which 6.0.1", ] [[package]] @@ -3131,7 +3170,7 @@ dependencies = [ "uuid", "v_htmlescape", "wax", - "which", + "which 6.0.1", "windows 0.54.0", "winreg", ] @@ -3421,7 +3460,7 @@ dependencies = [ "nu-utils", "num-format", "tempfile", - "which", + "which 6.0.1", ] [[package]] @@ -4655,6 +4694,16 @@ dependencies = [ "yansi", ] +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.60", +] + [[package]] name = "print-positions" version = "0.6.1" @@ -4682,6 +4731,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", + "syn 1.0.109", "version_check", ] @@ -6883,6 +6933,18 @@ dependencies = [ "url", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "which" version = "6.0.1" diff --git a/Cargo.toml b/Cargo.toml index 5701fe3958..a16befca9b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -235,6 +235,7 @@ pretty_assertions = { workspace = true } rstest = { workspace = true, default-features = false } serial_test = "3.1" tempfile = { workspace = true } +iai-callgrind = "0.10.2" [features] plugin = [ @@ -310,4 +311,9 @@ reedline = { git = "https://github.com/nushell/reedline", branch = "main" } # Run individual benchmarks like `cargo bench -- ` e.g. `cargo bench -- parse` [[bench]] name = "benchmarks" -harness = false \ No newline at end of file +harness = false + +# cargo bench --bench iai_benchmarks -- --save-summary=pretty-json +[[bench]] +name = "iai_benchmarks" +harness = false diff --git a/benches/fixtures/json_example.json b/benches/fixtures/json_example.json new file mode 100644 index 0000000000..f7b6f96390 --- /dev/null +++ b/benches/fixtures/json_example.json @@ -0,0 +1,1217 @@ +[ + { + "_id": "6623c00aa16be249c931db66", + "index": 0, + "guid": "67b63043-00ae-4dfc-9082-f1a994af30f3", + "isActive": true, + "balance": "$1,447.02", + "picture": "http://placehold.it/32x32", + "age": 31, + "eyeColor": "green", + "name": "Georgia Jimenez", + "gender": "female", + "company": "ASSISTIX", + "email": "georgiajimenez@assistix.com", + "phone": "+1 (916) 599-2149", + "address": "717 Prospect Place, Gloucester, Northern Mariana Islands, 7255", + "about": "Ut do non consectetur quis nulla Lorem dolore dolor anim aute ullamco dolore sunt id. Veniam commodo reprehenderit dolor qui ipsum. Aliquip ullamco cupidatat occaecat enim. Ea dolore elit dolore sunt. Tempor sint reprehenderit fugiat ex aliqua labore nisi fugiat anim id incididunt ad et.\r\n", + "registered": "2016-11-30T09:54:27 -01:00", + "latitude": -53.464406, + "longitude": 61.051489, + "tags": [ + "nulla", + "et", + "deserunt", + "et", + "nisi", + "magna", + "eu" + ], + "friends": [ + { + "id": 0, + "name": "Rowland Gould" + }, + { + "id": 1, + "name": "Erna Barton" + }, + { + "id": 2, + "name": "Sutton Randall" + } + ], + "greeting": "Hello, Georgia Jimenez! You have 10 unread messages.", + "favoriteFruit": "apple" + }, + { + "_id": "6623c00a11ec94c6e0e5d850", + "index": 1, + "guid": "c23514de-1656-4d37-9924-3df37b562735", + "isActive": true, + "balance": "$1,768.39", + "picture": "http://placehold.it/32x32", + "age": 40, + "eyeColor": "brown", + "name": "Letitia Wise", + "gender": "female", + "company": "EXOSIS", + "email": "letitiawise@exosis.com", + "phone": "+1 (979) 561-2711", + "address": "441 Bergen Street, Shrewsbury, Michigan, 1341", + "about": "Enim irure voluptate aliquip adipisicing cillum sint ut in officia esse amet veniam magna. Ad dolore officia magna tempor esse ut mollit. Non cupidatat sint laborum non do id excepteur et dolor cupidatat duis eiusmod. Aliqua elit amet mollit id. Mollit amet amet tempor eu magna exercitation ea elit anim do. Cupidatat sit aliquip ipsum voluptate duis nisi consectetur non ad sint aute aliquip.\r\n", + "registered": "2016-08-10T11:25:39 -02:00", + "latitude": 40.218908, + "longitude": -82.295335, + "tags": [ + "amet", + "incididunt", + "culpa", + "aliqua", + "officia", + "cupidatat", + "ullamco" + ], + "friends": [ + { + "id": 0, + "name": "Trina Hawkins" + }, + { + "id": 1, + "name": "Frost Porter" + }, + { + "id": 2, + "name": "Caitlin Terrell" + } + ], + "greeting": "Hello, Letitia Wise! You have 1 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00a57268c60a7aa2637", + "index": 2, + "guid": "06dfc21a-9422-4f60-ab7f-a1d5c9b96a25", + "isActive": false, + "balance": "$1,693.84", + "picture": "http://placehold.it/32x32", + "age": 30, + "eyeColor": "green", + "name": "Rosemary Pickett", + "gender": "female", + "company": "COSMOSIS", + "email": "rosemarypickett@cosmosis.com", + "phone": "+1 (942) 550-3182", + "address": "266 India Street, Magnolia, Connecticut, 7816", + "about": "Cupidatat dolore dolore magna consequat mollit minim qui eiusmod est incididunt duis aute eu. In officia reprehenderit elit commodo quis. Laborum ad sint est et laborum. Enim commodo magna veniam ad commodo. Cillum consequat voluptate irure laborum consequat ullamco eu laborum nisi occaecat elit tempor irure.\r\n", + "registered": "2019-06-08T03:02:31 -02:00", + "latitude": 4.767735, + "longitude": -123.227972, + "tags": [ + "esse", + "sit", + "deserunt", + "deserunt", + "consequat", + "proident", + "culpa" + ], + "friends": [ + { + "id": 0, + "name": "Ila Herrera" + }, + { + "id": 1, + "name": "Marlene Barber" + }, + { + "id": 2, + "name": "Nola Kramer" + } + ], + "greeting": "Hello, Rosemary Pickett! You have 10 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00ae1b6dde155a50c88", + "index": 3, + "guid": "1660c441-9d3f-4e8e-b7aa-a108f9b53ef3", + "isActive": false, + "balance": "$3,431.64", + "picture": "http://placehold.it/32x32", + "age": 30, + "eyeColor": "blue", + "name": "Josie Beard", + "gender": "female", + "company": "PORTICA", + "email": "josiebeard@portica.com", + "phone": "+1 (880) 530-3987", + "address": "665 Jackson Court, Madrid, Arizona, 6028", + "about": "Aliquip enim id occaecat officia. Eu veniam nulla aliquip excepteur cillum ea reprehenderit enim deserunt veniam ipsum laborum. Occaecat culpa labore adipisicing occaecat eu cillum cillum aute.\r\n", + "registered": "2018-02-17T06:21:14 -01:00", + "latitude": 70.705196, + "longitude": 38.660592, + "tags": [ + "deserunt", + "ipsum", + "anim", + "laborum", + "excepteur", + "incididunt", + "eu" + ], + "friends": [ + { + "id": 0, + "name": "Violet Drake" + }, + { + "id": 1, + "name": "Peck Stout" + }, + { + "id": 2, + "name": "Guadalupe Fulton" + } + ], + "greeting": "Hello, Josie Beard! You have 2 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a7f67f5556ac57cfe", + "index": 4, + "guid": "80b2dc55-5431-45b7-97b0-2755bdd53844", + "isActive": true, + "balance": "$2,263.27", + "picture": "http://placehold.it/32x32", + "age": 35, + "eyeColor": "blue", + "name": "Keith Oconnor", + "gender": "male", + "company": "DANCERITY", + "email": "keithoconnor@dancerity.com", + "phone": "+1 (893) 481-2089", + "address": "632 Perry Terrace, Gardiner, Oregon, 4737", + "about": "Sunt deserunt aliquip nulla irure aliquip elit cillum Lorem consequat officia do aute dolore. Pariatur Lorem anim nostrud in anim magna. Id elit mollit dolor adipisicing in ullamco Lorem deserunt nulla. Qui enim aliqua commodo anim eiusmod. Labore sunt excepteur est Lorem. Amet sint eiusmod adipisicing mollit minim exercitation velit culpa sint elit labore mollit aute in.\r\n", + "registered": "2017-06-11T04:16:47 -02:00", + "latitude": -21.477785, + "longitude": -87.286702, + "tags": [ + "deserunt", + "consequat", + "veniam", + "consequat", + "aliqua", + "sit", + "anim" + ], + "friends": [ + { + "id": 0, + "name": "Ayers Schultz" + }, + { + "id": 1, + "name": "Holman Bullock" + }, + { + "id": 2, + "name": "Hoffman Hensley" + } + ], + "greeting": "Hello, Keith Oconnor! You have 10 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00ab9712a3531342bc9", + "index": 5, + "guid": "5a7996a6-3b82-44d1-8157-2f1b4faefab5", + "isActive": true, + "balance": "$1,258.12", + "picture": "http://placehold.it/32x32", + "age": 38, + "eyeColor": "brown", + "name": "Julianne Battle", + "gender": "female", + "company": "TROLLERY", + "email": "juliannebattle@trollery.com", + "phone": "+1 (881) 431-3375", + "address": "698 Jefferson Avenue, Moquino, South Dakota, 997", + "about": "Reprehenderit minim elit mollit velit aute nisi ex fugiat esse id pariatur non anim. Lorem dolor sit ullamco est in sunt mollit. Sunt dolore consequat pariatur culpa adipisicing quis velit Lorem.\r\n", + "registered": "2017-05-26T09:43:37 -02:00", + "latitude": 71.404227, + "longitude": -11.385623, + "tags": [ + "veniam", + "duis", + "duis", + "veniam", + "nulla", + "ex", + "magna" + ], + "friends": [ + { + "id": 0, + "name": "House Finley" + }, + { + "id": 1, + "name": "Miller Bryant" + }, + { + "id": 2, + "name": "Dee Webb" + } + ], + "greeting": "Hello, Julianne Battle! You have 8 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a8123358411bc5208", + "index": 6, + "guid": "db8df4bf-32ab-4643-80f0-36c6dd1ab002", + "isActive": false, + "balance": "$2,334.84", + "picture": "http://placehold.it/32x32", + "age": 33, + "eyeColor": "green", + "name": "Monique Payne", + "gender": "female", + "company": "PARCOE", + "email": "moniquepayne@parcoe.com", + "phone": "+1 (867) 434-3366", + "address": "560 Lawn Court, Harrodsburg, Indiana, 9899", + "about": "Ex do culpa consequat enim nisi duis do. Quis ullamco et laboris sunt velit consectetur esse reprehenderit qui exercitation do. Est aute veniam ut aliquip. Laboris dolore duis aute cillum amet deserunt occaecat aute ex sit quis irure.\r\n", + "registered": "2017-01-15T08:59:34 -01:00", + "latitude": 84.026853, + "longitude": -37.675903, + "tags": [ + "laboris", + "tempor", + "quis", + "proident", + "irure", + "ullamco", + "et" + ], + "friends": [ + { + "id": 0, + "name": "Hayden Singleton" + }, + { + "id": 1, + "name": "Wanda Bass" + }, + { + "id": 2, + "name": "Hannah Warren" + } + ], + "greeting": "Hello, Monique Payne! You have 7 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00a4e21dc34732b6e97", + "index": 7, + "guid": "e368dc0d-ef9a-4b0f-817a-a48952d6846e", + "isActive": true, + "balance": "$3,259.68", + "picture": "http://placehold.it/32x32", + "age": 36, + "eyeColor": "blue", + "name": "Roach Travis", + "gender": "male", + "company": "SLOGANAUT", + "email": "roachtravis@sloganaut.com", + "phone": "+1 (977) 570-3598", + "address": "506 Onderdonk Avenue, Starks, Puerto Rico, 9473", + "about": "Eu tempor ipsum anim incididunt commodo officia. Dolore irure anim quis veniam culpa ea ut amet commodo. Qui elit velit mollit ad. Enim eiusmod velit adipisicing veniam ut Lorem culpa consequat irure voluptate tempor nostrud aliqua. Voluptate ullamco dolor dolore commodo irure elit cupidatat non ullamco minim qui. Amet ex eiusmod irure qui minim nulla est qui nisi sint irure dolor aliqua. Nulla aliqua eiusmod non ea sint ipsum.\r\n", + "registered": "2019-05-30T10:36:01 -02:00", + "latitude": 66.475843, + "longitude": -46.025032, + "tags": [ + "cupidatat", + "incididunt", + "sunt", + "reprehenderit", + "ea", + "ipsum", + "mollit" + ], + "friends": [ + { + "id": 0, + "name": "Carrie Nixon" + }, + { + "id": 1, + "name": "Guerrero Mercado" + }, + { + "id": 2, + "name": "Glenn Byrd" + } + ], + "greeting": "Hello, Roach Travis! You have 10 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00aa00d3112f927d24f", + "index": 8, + "guid": "85558bcd-0937-4b79-aba5-1560f5b2b213", + "isActive": true, + "balance": "$1,169.79", + "picture": "http://placehold.it/32x32", + "age": 39, + "eyeColor": "green", + "name": "Holly Mejia", + "gender": "female", + "company": "VANTAGE", + "email": "hollymejia@vantage.com", + "phone": "+1 (910) 476-2542", + "address": "947 Franklin Street, Smock, Palau, 8896", + "about": "Est veniam irure dolore officia qui mollit pariatur ut sint aute fugiat enim. Cillum cupidatat cupidatat proident aute Lorem Lorem. Do qui duis sit non enim mollit nisi nulla quis ad laborum. Aute sint esse esse incididunt occaecat elit exercitation consectetur do est excepteur dolore proident. Ut tempor anim irure ea esse. Sit irure eu dolor dolor do consequat do proident. Incididunt id elit reprehenderit deserunt commodo nostrud Lorem elit ex.\r\n", + "registered": "2018-07-26T10:44:19 -02:00", + "latitude": -87.368301, + "longitude": 104.210246, + "tags": [ + "consequat", + "laborum", + "veniam", + "minim", + "excepteur", + "ad", + "magna" + ], + "friends": [ + { + "id": 0, + "name": "Emilia Todd" + }, + { + "id": 1, + "name": "Ursula Savage" + }, + { + "id": 2, + "name": "Miranda Kemp" + } + ], + "greeting": "Hello, Holly Mejia! You have 2 unread messages.", + "favoriteFruit": "apple" + }, + { + "_id": "6623c00a11274d219143ab76", + "index": 9, + "guid": "6ddde77b-045b-457e-b947-2a557def7914", + "isActive": true, + "balance": "$1,556.04", + "picture": "http://placehold.it/32x32", + "age": 31, + "eyeColor": "brown", + "name": "Diaz Mathis", + "gender": "male", + "company": "SKYBOLD", + "email": "diazmathis@skybold.com", + "phone": "+1 (841) 453-3296", + "address": "770 Wortman Avenue, Veguita, Iowa, 2628", + "about": "Consectetur ullamco cillum irure ad excepteur qui est incididunt consectetur et dolor ea. Id sunt dolor laboris magna excepteur consectetur id officia in sunt. Ut id ea exercitation amet consectetur aute Lorem. Laborum aliqua irure ea elit cillum dolor sint in sint pariatur proident. Qui reprehenderit amet veniam Lorem reprehenderit aliquip do. Laborum voluptate Lorem voluptate ullamco eu excepteur magna sint ad eu. Proident proident exercitation velit excepteur aute ex non tempor pariatur laboris.\r\n", + "registered": "2017-09-28T07:22:29 -02:00", + "latitude": -12.157281, + "longitude": 92.70006, + "tags": [ + "do", + "ullamco", + "ipsum", + "in", + "enim", + "commodo", + "sint" + ], + "friends": [ + { + "id": 0, + "name": "Henry Horne" + }, + { + "id": 1, + "name": "Marietta Schwartz" + }, + { + "id": 2, + "name": "Lori Matthews" + } + ], + "greeting": "Hello, Diaz Mathis! You have 8 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00ae58e268a05321ddf", + "index": 10, + "guid": "0811af86-48b7-49e1-b7fe-5209ab16853c", + "isActive": true, + "balance": "$1,058.61", + "picture": "http://placehold.it/32x32", + "age": 27, + "eyeColor": "blue", + "name": "Cynthia Hogan", + "gender": "female", + "company": "UNIWORLD", + "email": "cynthiahogan@uniworld.com", + "phone": "+1 (832) 569-2748", + "address": "523 Schenck Street, Grayhawk, Idaho, 7974", + "about": "Proident laboris tempor veniam nostrud cillum amet consectetur est in ullamco irure eu exercitation. Est reprehenderit adipisicing commodo enim sit est mollit fugiat pariatur. Officia est elit esse Lorem voluptate labore in id in incididunt reprehenderit eu. Incididunt duis excepteur adipisicing anim ex mollit nisi nulla reprehenderit cillum id nulla. Quis culpa nulla nulla eu quis cillum dolore labore culpa aliquip. Sunt Lorem sint non amet est non culpa nostrud aute ut veniam laborum laboris do. Et magna ea sint dolor non pariatur labore veniam pariatur proident Lorem mollit ea.\r\n", + "registered": "2014-02-17T08:27:24 -01:00", + "latitude": -50.138803, + "longitude": -100.310498, + "tags": [ + "ullamco", + "labore", + "proident", + "aliquip", + "non", + "occaecat", + "labore" + ], + "friends": [ + { + "id": 0, + "name": "Sloan Adkins" + }, + { + "id": 1, + "name": "Sanford Alvarez" + }, + { + "id": 2, + "name": "Travis Griffin" + } + ], + "greeting": "Hello, Cynthia Hogan! You have 8 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a9a75000603c12abc", + "index": 11, + "guid": "ae2593b5-7aa2-472c-a1a0-5dbfc79b2038", + "isActive": false, + "balance": "$3,807.46", + "picture": "http://placehold.it/32x32", + "age": 34, + "eyeColor": "blue", + "name": "Ina Kirk", + "gender": "female", + "company": "NURALI", + "email": "inakirk@nurali.com", + "phone": "+1 (801) 543-2438", + "address": "708 Bryant Street, Bayview, Utah, 4732", + "about": "Eu id id labore qui qui velit eu esse qui veniam irure non. Amet labore eiusmod nisi consequat cupidatat ipsum amet occaecat non incididunt amet. Enim dolor nulla elit et. Incididunt velit veniam dolor sunt mollit nulla eiusmod deserunt cupidatat.\r\n", + "registered": "2021-08-12T09:42:22 -02:00", + "latitude": 54.410869, + "longitude": 88.018419, + "tags": [ + "ut", + "deserunt", + "esse", + "eiusmod", + "exercitation", + "esse", + "officia" + ], + "friends": [ + { + "id": 0, + "name": "Cooke Chase" + }, + { + "id": 1, + "name": "Thelma Brennan" + }, + { + "id": 2, + "name": "Kristi Perry" + } + ], + "greeting": "Hello, Ina Kirk! You have 3 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00ab00e2cbf192ec4c7", + "index": 12, + "guid": "2f53dab5-141f-4d4c-a698-bfdaec84b8ba", + "isActive": true, + "balance": "$2,443.14", + "picture": "http://placehold.it/32x32", + "age": 25, + "eyeColor": "blue", + "name": "Greta Farmer", + "gender": "female", + "company": "PRISMATIC", + "email": "gretafarmer@prismatic.com", + "phone": "+1 (894) 583-3790", + "address": "542 National Drive, Westerville, Alabama, 8078", + "about": "Dolor excepteur cupidatat pariatur id cupidatat ut aute culpa esse. Excepteur eu officia velit eiusmod adipisicing aute magna nostrud laborum occaecat exercitation nulla deserunt. Velit tempor voluptate dolore magna adipisicing quis exercitation aute fugiat laboris duis enim excepteur. Ex pariatur anim amet consectetur cillum officia magna laborum sunt. Cupidatat deserunt exercitation sunt magna.\r\n", + "registered": "2021-09-01T05:49:13 -02:00", + "latitude": -33.92069, + "longitude": 72.700364, + "tags": [ + "anim", + "ut", + "non", + "esse", + "sunt", + "eu", + "cillum" + ], + "friends": [ + { + "id": 0, + "name": "Tonya Burt" + }, + { + "id": 1, + "name": "Leonard Meyers" + }, + { + "id": 2, + "name": "Maggie England" + } + ], + "greeting": "Hello, Greta Farmer! You have 7 unread messages.", + "favoriteFruit": "apple" + }, + { + "_id": "6623c00a6f80545d4dfe852c", + "index": 13, + "guid": "af95829b-7433-4b9f-ba5f-74f1c435cd99", + "isActive": true, + "balance": "$1,632.94", + "picture": "http://placehold.it/32x32", + "age": 23, + "eyeColor": "green", + "name": "Baldwin Mathews", + "gender": "male", + "company": "CODAX", + "email": "baldwinmathews@codax.com", + "phone": "+1 (821) 560-2140", + "address": "101 Otsego Street, Brutus, Louisiana, 1898", + "about": "Pariatur amet aute nulla occaecat elit laboris laborum. Qui proident do aliqua incididunt id ullamco exercitation est nulla. Non adipisicing sint adipisicing non do Lorem fugiat. In ea eiusmod reprehenderit cupidatat aute nostrud ea dolor magna et in elit. Laborum irure consectetur cupidatat in ullamco labore minim commodo sint sunt cupidatat magna ad pariatur.\r\n", + "registered": "2021-02-23T01:38:17 -01:00", + "latitude": 85.0508, + "longitude": 29.844783, + "tags": [ + "voluptate", + "commodo", + "aliqua", + "dolor", + "ex", + "pariatur", + "proident" + ], + "friends": [ + { + "id": 0, + "name": "Ava Wilkinson" + }, + { + "id": 1, + "name": "Terrie Ryan" + }, + { + "id": 2, + "name": "Maude Dudley" + } + ], + "greeting": "Hello, Baldwin Mathews! You have 9 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a6230a815f3f58143", + "index": 14, + "guid": "9331b66f-29d4-492a-b21c-cbb2dc29cfd1", + "isActive": true, + "balance": "$2,549.97", + "picture": "http://placehold.it/32x32", + "age": 33, + "eyeColor": "brown", + "name": "Latasha Holt", + "gender": "female", + "company": "DRAGBOT", + "email": "latashaholt@dragbot.com", + "phone": "+1 (944) 506-2426", + "address": "847 Havens Place, Waukeenah, Massachusetts, 3966", + "about": "Commodo mollit eu commodo pariatur minim amet. Fugiat non tempor laboris labore nostrud ullamco est. Tempor id cillum dolore nisi proident. Dolore in officia sunt Lorem fugiat officia pariatur. Officia voluptate cillum eu nisi aute eu eu ut. Non laborum nulla ad fugiat cillum id. Consectetur occaecat tempor anim exercitation ea sint magna elit laborum in exercitation.\r\n", + "registered": "2023-10-12T08:56:42 -02:00", + "latitude": -3.464449, + "longitude": -33.771375, + "tags": [ + "veniam", + "cupidatat", + "culpa", + "culpa", + "laboris", + "et", + "in" + ], + "friends": [ + { + "id": 0, + "name": "Regina Mckenzie" + }, + { + "id": 1, + "name": "Margaret Ford" + }, + { + "id": 2, + "name": "Garrett Sexton" + } + ], + "greeting": "Hello, Latasha Holt! You have 4 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a51625f80b4e326c6", + "index": 15, + "guid": "a9ff33c9-8c12-4fcb-913a-f265aa6d764d", + "isActive": false, + "balance": "$2,822.16", + "picture": "http://placehold.it/32x32", + "age": 20, + "eyeColor": "green", + "name": "Sybil Lara", + "gender": "female", + "company": "HANDSHAKE", + "email": "sybillara@handshake.com", + "phone": "+1 (929) 428-2933", + "address": "748 Herbert Street, Mayfair, Ohio, 6303", + "about": "Eiusmod in nulla commodo aliqua sunt incididunt ad esse aliquip elit laboris consequat cupidatat eiusmod. Laborum qui fugiat irure aliquip proident ex ullamco sit cillum est ad non laboris elit. Esse duis proident aute esse eu. Dolor non duis pariatur amet ullamco ea exercitation ullamco. Est anim culpa mollit consequat dolore aliqua. Aliqua sunt eiusmod est do culpa velit.\r\n", + "registered": "2023-07-12T01:30:06 -02:00", + "latitude": 73.73017, + "longitude": 160.962495, + "tags": [ + "cillum", + "eiusmod", + "in", + "dolore", + "excepteur", + "consequat", + "proident" + ], + "friends": [ + { + "id": 0, + "name": "Deborah Davis" + }, + { + "id": 1, + "name": "Goodwin Fry" + }, + { + "id": 2, + "name": "Miles Lamb" + } + ], + "greeting": "Hello, Sybil Lara! You have 3 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00a24da283f93980e33", + "index": 16, + "guid": "c29504e5-f74b-4bf6-9325-02807ae3ddb1", + "isActive": false, + "balance": "$2,615.88", + "picture": "http://placehold.it/32x32", + "age": 27, + "eyeColor": "green", + "name": "Franks Christensen", + "gender": "male", + "company": "VIXO", + "email": "frankschristensen@vixo.com", + "phone": "+1 (923) 409-3752", + "address": "554 Myrtle Avenue, Strykersville, New Mexico, 9674", + "about": "Dolor ut anim proident cupidatat aute ipsum Lorem ad reprehenderit velit. Minim exercitation irure enim esse tempor proident quis. Velit ullamco ullamco ad voluptate incididunt tempor laboris. Irure ipsum amet irure officia cillum incididunt velit eu qui veniam sunt. Cupidatat id quis labore nisi fugiat proident nostrud. Veniam quis ipsum ea sunt cupidatat exercitation ad occaecat reprehenderit aliquip anim duis. Est anim eiusmod veniam ex fugiat aliqua.\r\n", + "registered": "2021-09-10T09:38:14 -02:00", + "latitude": -15.838512, + "longitude": -137.130114, + "tags": [ + "labore", + "enim", + "est", + "anim", + "ut", + "incididunt", + "et" + ], + "friends": [ + { + "id": 0, + "name": "Esmeralda Dixon" + }, + { + "id": 1, + "name": "Shannon Buckner" + }, + { + "id": 2, + "name": "Petra Blackburn" + } + ], + "greeting": "Hello, Franks Christensen! You have 6 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00ae7156c16ed4b6bfc", + "index": 17, + "guid": "83e4fc91-2f48-48a2-941b-57f21f4e3fff", + "isActive": false, + "balance": "$2,482.16", + "picture": "http://placehold.it/32x32", + "age": 34, + "eyeColor": "green", + "name": "Aileen Herman", + "gender": "female", + "company": "EXTREMO", + "email": "aileenherman@extremo.com", + "phone": "+1 (940) 559-2867", + "address": "492 Clifton Place, Hickory, Guam, 3827", + "about": "Ea cupidatat aute aliquip minim ea sit labore laboris id mollit. Laboris non dolor cupidatat ut culpa ipsum nulla ut velit fugiat sunt esse commodo. Adipisicing eiusmod sunt ullamco est cillum. Laboris sint qui ut enim enim. Anim do in velit Lorem id irure minim excepteur proident cupidatat incididunt. Aliqua consequat anim deserunt officia commodo est.\r\n", + "registered": "2015-07-18T01:44:15 -02:00", + "latitude": -38.070537, + "longitude": -157.32547, + "tags": [ + "voluptate", + "laboris", + "ex", + "dolore", + "excepteur", + "incididunt", + "veniam" + ], + "friends": [ + { + "id": 0, + "name": "Jerri Duke" + }, + { + "id": 1, + "name": "Powell Mullins" + }, + { + "id": 2, + "name": "Dillon Kim" + } + ], + "greeting": "Hello, Aileen Herman! You have 4 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a57d56157efc1e907", + "index": 18, + "guid": "f520cc9f-81f8-4a16-a8ea-ae1b6c75b6cd", + "isActive": true, + "balance": "$3,131.40", + "picture": "http://placehold.it/32x32", + "age": 40, + "eyeColor": "green", + "name": "Ray Rosales", + "gender": "male", + "company": "ZILODYNE", + "email": "rayrosales@zilodyne.com", + "phone": "+1 (965) 478-3479", + "address": "416 Grant Avenue, Haring, Kentucky, 2833", + "about": "Exercitation qui aliquip enim consectetur ea dolor ut nulla anim sunt labore cupidatat. Amet nostrud qui consequat deserunt tempor culpa aute reprehenderit incididunt elit reprehenderit excepteur pariatur. Adipisicing qui esse aute sint quis fugiat nostrud duis adipisicing voluptate. Laboris nostrud laborum incididunt culpa. Dolore dolor consectetur excepteur elit irure Lorem nulla. Est dolore sint consectetur fugiat deserunt minim ex amet cillum ex nostrud tempor elit. Mollit excepteur ut sunt eu officia commodo pariatur nisi.\r\n", + "registered": "2014-02-09T10:09:49 -01:00", + "latitude": 79.141289, + "longitude": 101.810699, + "tags": [ + "pariatur", + "sit", + "ex", + "ipsum", + "ut", + "irure", + "incididunt" + ], + "friends": [ + { + "id": 0, + "name": "Katie Marquez" + }, + { + "id": 1, + "name": "Mccormick Mcpherson" + }, + { + "id": 2, + "name": "Winters Townsend" + } + ], + "greeting": "Hello, Ray Rosales! You have 4 unread messages.", + "favoriteFruit": "apple" + }, + { + "_id": "6623c00ae85d5cb2a05601fa", + "index": 19, + "guid": "1be657b7-fe7e-4859-a988-cda71b8524d5", + "isActive": true, + "balance": "$3,653.23", + "picture": "http://placehold.it/32x32", + "age": 35, + "eyeColor": "brown", + "name": "Workman Leblanc", + "gender": "male", + "company": "CUJO", + "email": "workmanleblanc@cujo.com", + "phone": "+1 (805) 421-2277", + "address": "619 Tehama Street, Klagetoh, Montana, 352", + "about": "Dolor laborum esse est ut nulla fugiat do do. Ex aliqua ea non sint nisi officia minim deserunt occaecat ipsum laboris id ad. Aliquip qui ex in ullamco id ullamco laboris tempor excepteur deserunt aliqua ea aliquip laborum. Lorem qui irure deserunt sunt et proident ea reprehenderit nisi.\r\n", + "registered": "2020-12-08T05:39:55 -01:00", + "latitude": 36.997118, + "longitude": -86.533928, + "tags": [ + "ea", + "ipsum", + "quis", + "deserunt", + "eiusmod", + "laboris", + "exercitation" + ], + "friends": [ + { + "id": 0, + "name": "Christensen Combs" + }, + { + "id": 1, + "name": "Dawn Woods" + }, + { + "id": 2, + "name": "Gonzales Jordan" + } + ], + "greeting": "Hello, Workman Leblanc! You have 9 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a2ec3df6e6ff978db", + "index": 20, + "guid": "07229845-b1cb-4719-8725-899160ae7d80", + "isActive": false, + "balance": "$3,621.02", + "picture": "http://placehold.it/32x32", + "age": 27, + "eyeColor": "green", + "name": "Ellison Roberson", + "gender": "male", + "company": "INSURETY", + "email": "ellisonroberson@insurety.com", + "phone": "+1 (843) 509-2911", + "address": "721 Denton Place, Delwood, Nebraska, 9653", + "about": "Cillum exercitation cupidatat aliquip velit ad ut aliqua enim. Voluptate sit nisi quis amet Lorem ea ea sunt cillum magna commodo labore. Eiusmod id esse laboris nulla ad nostrud anim. Dolor ex elit quis Lorem minim.\r\n", + "registered": "2019-08-15T01:13:02 -02:00", + "latitude": -42.155392, + "longitude": -133.888754, + "tags": [ + "enim", + "officia", + "amet", + "do", + "mollit", + "enim", + "nostrud" + ], + "friends": [ + { + "id": 0, + "name": "Maria Boyle" + }, + { + "id": 1, + "name": "White Guthrie" + }, + { + "id": 2, + "name": "Norris Parks" + } + ], + "greeting": "Hello, Ellison Roberson! You have 7 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "6623c00a1cd05c0b4ec1719a", + "index": 21, + "guid": "8929c9fd-8048-40f0-bb33-66c1a436e30e", + "isActive": false, + "balance": "$1,804.29", + "picture": "http://placehold.it/32x32", + "age": 39, + "eyeColor": "brown", + "name": "Lorene Torres", + "gender": "female", + "company": "SLAX", + "email": "lorenetorres@slax.com", + "phone": "+1 (924) 548-2591", + "address": "367 Roder Avenue, Lloyd, Marshall Islands, 892", + "about": "Proident duis commodo pariatur et ut nulla voluptate tempor occaecat dolore consequat id id. Culpa consectetur id nisi sit ad elit reprehenderit esse. Cillum ad magna irure ut laboris tempor incididunt officia qui culpa esse consequat nostrud minim.\r\n", + "registered": "2017-05-26T01:01:37 -02:00", + "latitude": -78.906128, + "longitude": -81.087681, + "tags": [ + "magna", + "aliquip", + "tempor", + "ea", + "eu", + "Lorem", + "laboris" + ], + "friends": [ + { + "id": 0, + "name": "Doris Haney" + }, + { + "id": 1, + "name": "Bobbi Sims" + }, + { + "id": 2, + "name": "Clarice Lloyd" + } + ], + "greeting": "Hello, Lorene Torres! You have 8 unread messages.", + "favoriteFruit": "apple" + }, + { + "_id": "6623c00a06c710e3b7c4c99e", + "index": 22, + "guid": "75bf56a1-3034-44c4-a5c0-8a4517c3aa05", + "isActive": true, + "balance": "$1,776.00", + "picture": "http://placehold.it/32x32", + "age": 32, + "eyeColor": "blue", + "name": "Rodriguez Hancock", + "gender": "male", + "company": "ROOFORIA", + "email": "rodriguezhancock@rooforia.com", + "phone": "+1 (958) 589-3266", + "address": "891 Malbone Street, Greenwich, Vermont, 7980", + "about": "Aliquip dolor do consectetur deserunt laborum mollit est dolore duis reprehenderit. Ea cillum esse id laboris velit ad cupidatat aliqua commodo adipisicing cillum quis cupidatat. Amet ea consequat velit in tempor incididunt amet adipisicing velit est laborum Lorem amet. Id ad consectetur commodo incididunt duis qui exercitation eiusmod. Cupidatat cupidatat in Lorem non do anim.\r\n", + "registered": "2014-06-27T10:33:01 -02:00", + "latitude": -13.734617, + "longitude": -61.199525, + "tags": [ + "anim", + "quis", + "et", + "excepteur", + "aliquip", + "ea", + "aliqua" + ], + "friends": [ + { + "id": 0, + "name": "Luella Nunez" + }, + { + "id": 1, + "name": "Christi Aguirre" + }, + { + "id": 2, + "name": "Leanna Cobb" + } + ], + "greeting": "Hello, Rodriguez Hancock! You have 1 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00aa80f1632624e38a0", + "index": 23, + "guid": "d4a24368-f22f-42f1-bf97-b58622995e02", + "isActive": false, + "balance": "$3,011.08", + "picture": "http://placehold.it/32x32", + "age": 36, + "eyeColor": "brown", + "name": "Doreen Gordon", + "gender": "female", + "company": "FANFARE", + "email": "doreengordon@fanfare.com", + "phone": "+1 (815) 542-2266", + "address": "279 Wyona Street, Keller, Wyoming, 5943", + "about": "Tempor nostrud officia velit enim incididunt nisi eu nisi nisi commodo ea Lorem officia. Est officia amet duis qui officia pariatur ut sunt proident magna consectetur ut sunt. Nostrud minim laborum qui magna nisi commodo occaecat. Do irure ea occaecat commodo voluptate adipisicing. Amet consequat irure eiusmod eiusmod minim exercitation sint cupidatat reprehenderit ad.\r\n", + "registered": "2023-11-17T10:53:04 -01:00", + "latitude": 0.091355, + "longitude": 55.137498, + "tags": [ + "cillum", + "cillum", + "cillum", + "sunt", + "aute", + "proident", + "culpa" + ], + "friends": [ + { + "id": 0, + "name": "Justine Valentine" + }, + { + "id": 1, + "name": "Andrews Webster" + }, + { + "id": 2, + "name": "Sally Case" + } + ], + "greeting": "Hello, Doreen Gordon! You have 2 unread messages.", + "favoriteFruit": "apple" + }, + { + "_id": "6623c00acff7564a9a64c5f8", + "index": 24, + "guid": "c88b1542-7b04-41c4-afc2-ce3598f35879", + "isActive": false, + "balance": "$2,762.14", + "picture": "http://placehold.it/32x32", + "age": 35, + "eyeColor": "green", + "name": "Sexton Stewart", + "gender": "male", + "company": "EARWAX", + "email": "sextonstewart@earwax.com", + "phone": "+1 (862) 522-2074", + "address": "807 Varick Avenue, Coleville, Alaska, 4910", + "about": "Commodo dolor deserunt elit exercitation id id ad occaecat fugiat mollit aliquip cillum velit. Occaecat sunt in reprehenderit nulla exercitation adipisicing culpa laborum et dolor nulla. Mollit aute culpa esse eiusmod fugiat et irure. Occaecat consequat ea consequat voluptate anim reprehenderit. Magna irure ut id et quis ex pariatur consectetur anim veniam. Laboris dolor est irure exercitation aliqua id.\r\n", + "registered": "2024-03-13T07:23:04 -01:00", + "latitude": 28.110154, + "longitude": 148.398587, + "tags": [ + "sint", + "reprehenderit", + "sint", + "adipisicing", + "qui", + "magna", + "ad" + ], + "friends": [ + { + "id": 0, + "name": "Briana Hahn" + }, + { + "id": 1, + "name": "Margery Moore" + }, + { + "id": 2, + "name": "Rosanna Bridges" + } + ], + "greeting": "Hello, Sexton Stewart! You have 7 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a4474a28772276b99", + "index": 25, + "guid": "0621f6ab-9837-4efb-9707-0be18b9e798a", + "isActive": true, + "balance": "$3,417.63", + "picture": "http://placehold.it/32x32", + "age": 36, + "eyeColor": "green", + "name": "Gutierrez Sykes", + "gender": "male", + "company": "ZILIDIUM", + "email": "gutierrezsykes@zilidium.com", + "phone": "+1 (902) 441-2264", + "address": "820 Tech Place, Newry, Florida, 6230", + "about": "Velit consequat excepteur nulla ipsum eiusmod sit dolore Lorem ullamco eu. Occaecat et ea excepteur exercitation ut reprehenderit occaecat consequat deserunt adipisicing tempor. Laborum minim occaecat fugiat nulla officia ad non aute. Eiusmod pariatur eu eiusmod consectetur excepteur velit nisi aute fugiat ipsum culpa minim. Occaecat aliqua ipsum sit adipisicing do amet ex.\r\n", + "registered": "2019-09-30T02:24:58 -02:00", + "latitude": -33.43164, + "longitude": 96.269765, + "tags": [ + "consequat", + "sint", + "culpa", + "occaecat", + "exercitation", + "occaecat", + "ipsum" + ], + "friends": [ + { + "id": 0, + "name": "Tasha Chandler" + }, + { + "id": 1, + "name": "Araceli Golden" + }, + { + "id": 2, + "name": "Carol Lambert" + } + ], + "greeting": "Hello, Gutierrez Sykes! You have 2 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "6623c00a7c41825f40adc0eb", + "index": 26, + "guid": "39b99d1f-bf16-461f-9f88-89f90855de73", + "isActive": true, + "balance": "$1,161.75", + "picture": "http://placehold.it/32x32", + "age": 29, + "eyeColor": "blue", + "name": "Gross Valencia", + "gender": "male", + "company": "TRASOLA", + "email": "grossvalencia@trasola.com", + "phone": "+1 (913) 541-3643", + "address": "755 Lawton Street, Homeworth, North Carolina, 7106", + "about": "Anim exercitation do labore adipisicing velit laborum irure ut laboris amet nostrud. Laborum deserunt anim Lorem anim. Nisi velit dolor reprehenderit exercitation anim. Sint fugiat est nulla sint eu. Ex consectetur eu nisi labore laborum.\r\n", + "registered": "2018-01-15T10:47:23 -01:00", + "latitude": 76.114787, + "longitude": 101.669122, + "tags": [ + "mollit", + "id", + "sit", + "ex", + "ea", + "do", + "voluptate" + ], + "friends": [ + { + "id": 0, + "name": "Rhoda Moss" + }, + { + "id": 1, + "name": "Matilda George" + }, + { + "id": 2, + "name": "Chan Guerrero" + } + ], + "greeting": "Hello, Gross Valencia! You have 2 unread messages.", + "favoriteFruit": "banana" + } +] \ No newline at end of file diff --git a/benches/fixtures/math.nu b/benches/fixtures/math.nu new file mode 100644 index 0000000000..f459c7391c --- /dev/null +++ b/benches/fixtures/math.nu @@ -0,0 +1 @@ +14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - (14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23) + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - (14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23) + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - (14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23) + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - (14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23) + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - (14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23) + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - (14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 - 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23 + 14 - 62 + 1.4 * 3.1415 / 2.1 + 23) \ No newline at end of file diff --git a/benches/iai_benchmarks.rs b/benches/iai_benchmarks.rs new file mode 100644 index 0000000000..b04f2fef09 --- /dev/null +++ b/benches/iai_benchmarks.rs @@ -0,0 +1,59 @@ +use iai_callgrind::{ + binary_benchmark_group, main, Arg, BinaryBenchmarkConfig, BinaryBenchmarkGroup, Fixtures, Run, +}; + +// Callgrid is a benchmarking tool that simulate the execution of a program on a virtual machine. +// It is useful to measure the performance of a program in a controlled environment. +// See https://github.com/iai-callgrind/iai-callgrind?tab=readme-ov-file#installation for installation instructions. +// You can run this benchmark suit by running `cargo bench --bench iai_benchmarks`. + +fn my_setup() {} + +binary_benchmark_group!( + name = my_exe_group; + setup = my_setup; + // This directory will be copied into the root of the sandbox (as `fixtures`) + config = BinaryBenchmarkConfig::default().fixtures(Fixtures::new("benches/fixtures")); + benchmark = + |"nu", group: &mut BinaryBenchmarkGroup| { + setup_my_exe_group(group) + } +); + +fn setup_my_exe_group(group: &mut BinaryBenchmarkGroup) { + group + .bench(Run::with_arg(Arg::new( + "standard startup", + ["-c", "'exit'"], + ))) + .bench(Run::with_arg(Arg::new( + "clean startup", + ["--no-std-lib", "--no-history", "-n", "-c", "'exit'"], + ))) + .bench(Run::with_arg(Arg::new( + "for loop", + [ + "--no-std-lib", + "--no-history", + "-n", + "-c", + "'(for x in 1..10000 { echo $x }) | ignore'", + ], + ))) + .bench(Run::with_arg(Arg::new( + "open json", + [ + "--no-std-lib", + "--no-history", + "-n", + "-c", + "'open fixtures/json_example.json'", + ], + ))) + .bench(Run::with_arg(Arg::new( + "math", + ["--no-std-lib", "--no-history", "-n", "fixtures/math.nu"], + ))); +} + +main!(binary_benchmark_groups = my_exe_group);