Skip to content

Commit

Permalink
temp: lookupFastSeed list only < 60ms (749 total)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarrenSem authored Jan 22, 2024
1 parent 54e2c18 commit 7b2ad18
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 6 additions & 3 deletions catan-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,13 @@ const updateMapMode = mode => { // ONLY if mode is DIFFERENT than globalMapMode
// 3001,3002,3003,3004,3005,3013,3016,3024,3025,3026,3031,3034,3039,3040,3053,3055,3057,3064,3065,3068,3070,3077,3080,3081,3082,3084,3097,3100,3101,3106,3108,3110,3111,3113,3114,3119,3120,3123,3124,3127,3132,3133,3134,3136,3137,3144,3151,3152,3158,3163,3169,3170,3173,3179,3187,3189,3191,3193,3197,3198,3210,3214,3222,3227,3232,3234,3238,3240,3244,3254,3268,3274,3277,3280,3282,3287,3289,3291,3292,3293,3297,3305,3306,3309,3316,3317,3321,3332,3336,3340,3343,3350,3352,3353,3354,3356,3359,3364,3368,3372,3375,3376,3377,3388,3393,3397,3403,3405,3408,3409,3410,3411,3412,3414,3415,3416,3417,3418,3421,3422,3424,3434,3438,3440,3441,3448,3450,3451,3453,3457,3461,3462,3463,3464,3469,3473,3475,3478,3483,3485,3488,3493,3499,3505,3507,3510,3518,3519,3521,3522,3523,3543,3545,3550,3551,3554,3564,3575,3576,3582,3586,3589,3595,3604,3607,3611,3615,3616,3617,3619,3620,3621,3626,3630,3632,3642,3644,3648,3651,3654,3660,3661,3663,3664,3675,3678,3685,3687,3690,3691,3693,3694,3697,3700,3706,3708,3710,3714,3723,3725,3728,3731,3734,3735,3749,3756,3759,3763,3771,3775,3777,3784,3786,3796,3798,3799,3802,3806,3812,3816,3817,3823,3825,3826,3827,3830,3835,3836,3839,3847,3849,3852,3853,3859,3861,3862,3863,3867,3871,3881,3884,3885,3886,3887,3888,3889,3891,3892,3893,3898,3899,3901,3902,3909,3913,3917,3920,3923,3924,3927,3928,3931,3936,3938,3943,3949,3951,3953,3956,3958,3962,3969,3971,3975,3977,3978,3979,3982,3986,3988,3989,3994,3995,3996,3998,4001,4005,4006,4010,4012,4013,4016,4018,4019,4021,4028,4031,4033,4038,4039,4042,4043,4047,4049,4050,4054,4060,4072,4077,4084,4091,4093,4100,4101,4115,4116,4122,4124,4129,4133,4139,4142,4147,4148,4153,4156,4162,4164,4169,4171,4172,4173,4175,4176,4179,4181,4189,4197,4202,4204,4210,4212,4214,4221,4223,4226,4238,4240,4242,4244,4246,4247,4248,4249,4250,4252,4262,4264,4270,4274,4280,4281,4282,4283,4285,4287,4288,4290,4292,4293,4298,4301,4319,4326,4329,4337,4350,4352,4357,4360,4363,4366,4370,4373,4374,4376,4378,4386,4390,4391,4397,4405,4407,4415,4416,4417,4424,4425,4427,4429,4431,4436,4437,4440,4442,4452,4459,4471,4472,4473,4479,4489,4491,4492,4494,4497,4500,4504,4508,4510,4517,4521,4523,4524,4526,4529,4533,4534,4535,4538,4542,4544,4546,4552,4555,4556,4563,4566,4567,4572,4584,4587,4588,4591,4593,4596,4600,4601,4607,4608,4611,4617,4625,4626,4627,4631,4634,4637,4641,4642,4644,4650,4651,4652,4654,4656,4657,4659,4666,4668,4670,4671,4673,4675,4682,4687,4689,4690,4692,4704,4705,4707,4708,4715,4716,4717,4718,4719,4721,4722,4723,4728,4730,4731,4732,4733,4734,4741,4742,4758,4759,4765,4771,4773,4774,4779,4788,4791,4799,4800,4810,4816,4817,4818,4819,4821,4822,4830,4831,4833,4841,4845,4847,4849,4850,4853,4854,4859,4860,4863,4864,4879,4880,4881,4882,4884,4885,4886,4890,4895,4897,4899,4900,4902,4904,4906,4909,4910,4913,4916,4920,4921,4925,4926,4935,4939,4943,4944,4948,4949,4950,4954,4955,4956,4957,4958,4963,4964,4965,4966,4968,4970,4971,4973,4974,4976,4979,4981,4984,4987,4989,4992
// ]; // .length = 1281 (previously 699)

// fastSeedArray = [
// 2,4,20,23,39,42,49,65,106,114,116,129,130,141,145,155,183,186,201,214,227,247,252,265,285,288,303,324,361,378,389,407,418,423,439,472,484,516,543,545,547,570,595,596,610,642,646,650,654,662,664,665,680,690,708,713,738,756,806,849,851,855,864,868,875,903,908,914,923,929,946,985,997,1056,1073,1099,1129,1139,1169,1180,1182,1190,1204,1219,1230,1251,1256,1287,1290,1295,1297,1308,1332,1333,1342,1358,1364,1378,1379,1405,1411,1433,1440,1456,1500,1510,1523,1541,1546,1553,1561,1562,1565,1575,1597,1601,1611,1614,1623,1626,1631,1639,1704,1706,1708,1713,1719,1735,1737,1794,1813,1843,1878,1895,1898,1901,1907,1909,1948,1949,1957,1983,1987,1999,2001,2019,2027,2046,2071,2102,2105,2123,2127,2134,2136,2157,2161,2178,2197,2205,2214,2219,2240,2265,2268,2288,2291,2333,2345,2346,2359,2460,2474,2491,2501,2505,2516,2536,2569,2571,2572,2595,2598,2607,2622,2623,2634,2636,2640,2649,2657,2693,2695,2712,2752,2766,2794,2801,2815,2830,2852,2854,2857,2872,2880,2891,2910,2915,2921,2922,2970,3001,3002,3003,3004,3025,3040,3080,3084,3106,3111,3120,3144,3158,3173,3179,3197,3210,3282,3297,3316,3317,3336,3375,3393,3397,3403,3409,3418,3422,3440,3448,3451,3457,3462,3478,3522,3550,3575,3576,3582,3620,3626,3648,3654,3660,3663,3685,3694,3697,3714,3731,3734,3756,3777,3786,3823,3849,3862,3863,3881,3902,3917,3924,3931,3936,3943,3986,3995,4006,4019,4028,4031,4084,4100,4116,4129,4172,4173,4189,4197,4202,4244,4247,4250,4283,4292,4301,4329,4352,4363,4370,4386,4415,4429,4497,4534,4535,4546,4555,4556,4566,4584,4596,4651,4656,4659,4666,4668,4673,4690,4715,4719,4733,4734,4742,4779,4791,4819,4830,4831,4853,4854,4879,4881,4884,4885,4886,4899,4913,4916,4935,4943,4944,4948,4957,4966,4974,4981,4989,5002,5027,5035,5051,5074,5078,5088,5103,5118,5121,5154,5165,5176,5181,5184,5222,5233,5244,5252,5304,5325,5334,5335,5340,5376,5397,5403,5409,5470,5472,5478,5487,5523,5572,5573,5575,5590,5600,5648,5668,5688,5716,5724,5787,5803,5814,5839,5862,5944,6073,6090,6125,6136,6162,6179,6188,6242,6261,6265,6282,6346,6360,6370,6418,6443,6508,6514,6586,6632,6641,6667,6682,6683,6693,6717,6729,6739,6742,6762,6768,6795,6796,6808,6849,6858,6865,6870,6890,6899,6962,6978,6995,7000,7002,7007,7010,7050,7052
// ]; // .length === 448 // via fastSeedArray = getTinyTimings(100) #NotBad

fastSeedArray = [
2,4,20,23,39,42,49,65,106,114,116,129,130,141,145,155,183,186,201,214,227,247,252,265,285,288,303,324,361,378,389,407,418,423,439,472,484,516,543,545,547,570,595,596,610,642,646,650,654,662,664,665,680,690,708,713,738,756,806,849,851,855,864,868,875,903,908,914,923,929,946,985,997,1056,1073,1099,1129,1139,1169,1180,1182,1190,1204,1219,1230,1251,1256,1287,1290,1295,1297,1308,1332,1333,1342,1358,1364,1378,1379,1405,1411,1433,1440,1456,1500,1510,1523,1541,1546,1553,1561,1562,1565,1575,1597,1601,1611,1614,1623,1626,1631,1639,1704,1706,1708,1713,1719,1735,1737,1794,1813,1843,1878,1895,1898,1901,1907,1909,1948,1949,1957,1983,1987,1999,2001,2019,2027,2046,2071,2102,2105,2123,2127,2134,2136,2157,2161,2178,2197,2205,2214,2219,2240,2265,2268,2288,2291,2333,2345,2346,2359,2460,2474,2491,2501,2505,2516,2536,2569,2571,2572,2595,2598,2607,2622,2623,2634,2636,2640,2649,2657,2693,2695,2712,2752,2766,2794,2801,2815,2830,2852,2854,2857,2872,2880,2891,2910,2915,2921,2922,2970,3001,3002,3003,3004,3025,3040,3080,3084,3106,3111,3120,3144,3158,3173,3179,3197,3210,3282,3297,3316,3317,3336,3375,3393,3397,3403,3409,3418,3422,3440,3448,3451,3457,3462,3478,3522,3550,3575,3576,3582,3620,3626,3648,3654,3660,3663,3685,3694,3697,3714,3731,3734,3756,3777,3786,3823,3849,3862,3863,3881,3902,3917,3924,3931,3936,3943,3986,3995,4006,4019,4028,4031,4084,4100,4116,4129,4172,4173,4189,4197,4202,4244,4247,4250,4283,4292,4301,4329,4352,4363,4370,4386,4415,4429,4497,4534,4535,4546,4555,4556,4566,4584,4596,4651,4656,4659,4666,4668,4673,4690,4715,4719,4733,4734,4742,4779,4791,4819,4830,4831,4853,4854,4879,4881,4884,4885,4886,4899,4913,4916,4935,4943,4944,4948,4957,4966,4974,4981,4989,5002,5027,5035,5051,5074,5078,5088,5103,5118,5121,5154,5165,5176,5181,5184,5222,5233,5244,5252,5304,5325,5334,5335,5340,5376,5397,5403,5409,5470,5472,5478,5487,5523,5572,5573,5575,5590,5600,5648,5668,5688,5716,5724,5787,5803,5814,5839,5862,5944,6073,6090,6125,6136,6162,6179,6188,6242,6261,6265,6282,6346,6360,6370,6418,6443,6508,6514,6586,6632,6641,6667,6682,6683,6693,6717,6729,6739,6742,6762,6768,6795,6796,6808,6849,6858,6865,6870,6890,6899,6962,6978,6995,7000,7002,7007,7010,7050,7052
]; // .length === 448 // via fastSeedArray = getTinyTimings(100) #NotBad
2,4,106,114,116,141,145,155,186,201,214,227,247,252,265,288,324,361,378,389,516,543,545,547,596,642,646,650,662,664,690,708,713,738,855,868,875,903,908,923,929,985,997,1129,1169,1182,1190,1204,1230,1251,1256,1308,1332,1333,1358,1364,1411,1433,1440,1456,1510,1523,1541,1546,1553,1562,1565,1575,1597,1611,1614,1623,1626,1631,1639,1704,1706,1713,1719,1737,1794,1813,1878,1895,1898,1909,1948,1949,1983,1987,2001,2019,2027,2046,2102,2127,2134,2157,2205,2214,2219,2240,2268,2291,2345,2359,2501,2572,2598,2607,2623,2636,2649,2657,2695,2712,2766,2794,2801,2815,2830,2854,2857,2872,2880,2891,2910,2915,2921,3002,3004,3025,3080,3084,3106,3111,3144,3173,3197,3210,3282,3297,3316,3336,3375,3393,3397,3418,3422,3440,3448,3522,3550,3575,3576,3626,3648,3654,3663,3685,3694,3714,3731,3734,3756,3777,3786,3823,3862,3863,3917,3924,3936,3986,3995,4019,4028,4031,4084,4100,4173,4189,4197,4247,4283,4301,4329,4352,4363,4370,4386,4415,4555,4556,4566,4584,4596,4659,4666,4690,4715,4733,4779,4830,4831,4879,4885,4886,4913,4916,4935,4943,4957,4974,4981,4989,5002,5035,5051,5074,5078,5118,5165,5176,5181,5222,5233,5244,5252,5325,5335,5340,5376,5403,5409,5470,5472,5478,5487,5523,5572,5600,5648,5724,5787,5803,5814,5839,5862,6073,6090,6125,6136,6188,6242,6265,6282,6346,6360,6418,6443,6508,6632,6641,6667,6682,6683,6742,6762,6796,6808,6849,6870,6899,6978,6995,7000,7002,7007,7010,7052,7099,7220,7241,7246,7263,7308,7311,7315,7339,7348,7352,7377,7404,7414,7427,7441,7499,7515,7623,7690,7702,7717,7718,7731,7750,7761,7769,7774,7782,7807,7809,7813,7866,7906,7915,7916,7939,7945,7947,8003,8004,8015,8021,8065,8133,8167,8242,8265,8268,8340,8373,8387,8407,8454,8464,8598,8630,8661,8684,8688,8717,8722,8748,8786,8800,8823,8847,8855,8863,8906,8911,8947,8959,8966,8970,8975,8999,9004,9044,9108,9153,9175,9214,9263,9273,9274,9275,9281,9308,9319,9326,9353,9400,9407,9414,9541,9585,9589,9594,9595,9625,9626,9656,9664,9679,9706,9708,9752,9760,9827,9889,9922,10037,10092,10148,10218,10234,10260,10280,10285,10311,10320,10357,10376,10378,10427,10438,10464,10491,10494,10549,10569,10580,10677,10689,10814,10876,10913,10924,10937,11016,11042,11190,11221,11251,11263,11272,11375,11405,11410,11413,11458,11474,11533,11534,11595,11605,11659,11662,11670,11678,11689,11696,11707,11708,11747,11748,11752,11775,11813,11842,11877,11908,11938,11944,11956,12001,12028,12051,12082,12084,12092,12096,12099,12113,12129,12143,12175,12178,12226,12270,12284,12357,12414,12421,12513,12524,12543,12580,12590,12624,12634,12727,12731,12741,12766,12792,12801,12852,12854,12882,12926,12978,13018,13047,13050,13077,13124,13133,13137,13143,13146,13158,13191,13197,13205,13210,13239,13246,13248,13321,13329,13353,13372,13378,13394,13412,13420,13421,13438,13454,13471,13516,13525,13537,13564,13571,13603,13639,13659,13661,13666,13696,13711,13745,13757,13796,13833,13855,13919,13928,13964,13972,14001,14051,14063,14080,14084,14092,14095,14100,14166,14232,14235,14323,14346,14357,14446,14449,14501,14517,14654,14663,14705,14730,14780,14845,14854,14861,14871,14924,14947,15076,15080,15107,15176,15180,15213,15238,15297,15359,15429,15458,15463,15489,15537,15551,15573,15602,15607,15618,15648,15680,15682,15689,15727,15782,15799,15812,15894,15898,15957,15998,16060,16093,16098,16126,16152,16171,16286,16288,16292,16293,16307,16354,16380,16404,16474,16476,16571,16581,16585,16616,16629,16694,16708,16732,16854,16855,16912,16923,16971,16979,17059,17061,17117,17159,17185,17191,17209,17238,17294,17383,17389,17399,17427,17459,17472,17482,17489,17530,17537,17542,17547,17553,17570,17581,17585,17596,17607,17609,17628,17634,17635,17644,17662,17714,17738,17763,17783,17832,17845,17864,17876,17885,17914,17925,17940,17991,18030,18073,18074,18086,18095,18168,18217,18220,18228,18246,18277,18286,18309,18321,18403,18468,18487,18502,18531,18582,18610,18681,18688,18707,18718,18719,18725,18736,18804,18824,18841,18843,18942,18982,19028,19031,19037,19044,19075,19089,19093,19133,19135,19167,19173,19204,19226,19262,19312,19360,19433,19438,19487,19535,19543,19551,19559,19597,19622,19652,19669,19691,19809,19826,19833,19853,19914,19940,19944
]; // .length === 749 // via getTinyTimings(60) #RatherGood

};
// console.timeEnd("populate fastSeedArray"); // populate fastSeedArray: 0.005126953125 ms
Expand Down Expand Up @@ -1013,4 +1017,3 @@ const initialLoad = evt => {
globalThis.window
? window.addEventListener( initialLoadEventName, initialLoad)
: initialLoad();

Loading

0 comments on commit 7b2ad18

Please sign in to comment.