Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
getCoordAndBearing
(version: 0)
Comparing performance of:
test1 vs test2
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Turf.js/5.1.6/turf.min.js"></script> <div id="result1"></div> <div id="result2"></div>
Script Preparation code:
var line = { "type": "Feature", "properties": { "color": "#80C342", "width": 8, "id": "JR-East.Yamanote.13", "zoom": 13, "type": 0, "altitude": 0, "station-offsets": [ 0.000005020544450257813, 0.8025285605422744, 1.918602634758196, 3.4767080827256787, 4.959936793517501, 6.450327685523881, 7.848764049167124, 8.61070952557695, 9.79979230222691, 11.170130419166634, 12.034746644946356, 13.199734265769715, 15.076976512301586, 16.28041938416763, 17.040433546484977, 18.514264486734636, 19.30141906692479, 19.9439279884551, 20.849245428679488, 21.846691420021372, 22.61992001255976, 23.620238726705644, 24.396252327766135, 25.58416179102481, 26.40608099349241, 27.489238629458438, 28.71472714914998, 30.184225657213165, 32.34708705014366, 34.52503011387733 ] }, "geometry": { "type": "LineString", "coordinates": [ [ 139.7281188, 35.6201686 ], [ 139.7280607, 35.6202427 ], [ 139.7276152, 35.6208009 ], [ 139.7273298, 35.6211763 ], [ 139.7269649, 35.6217441 ], [ 139.7262959, 35.6226208 ], [ 139.7260255, 35.6229648 ], [ 139.7259945, 35.6230055 ], [ 139.7257145, 35.6233788 ], [ 139.725582, 35.6235481 ], [ 139.7251286, 35.6241486 ], [ 139.7248822, 35.6244967 ], [ 139.7247061, 35.624722 ], [ 139.7245127, 35.6249714 ], [ 139.7241601, 35.6254323 ], [ 139.7241076, 35.6255018 ], [ 139.7239043, 35.6257699 ], [ 139.7234492, 35.6263683 ], [ 139.7234463, 35.6263722 ], [ 139.7234156, 35.6264091 ], [ 139.7231947, 35.626675 ], [ 139.7229635, 35.6269211 ], [ 139.7226741, 35.6271988 ], [ 139.7225945, 35.6272673 ], [ 139.722392, 35.6274395 ], [ 139.7220935, 35.6276681 ], [ 139.7217685, 35.6278832 ], [ 139.7214444, 35.628075 ], [ 139.7211021, 35.6282591 ], [ 139.7207368, 35.6284377 ], [ 139.7202563, 35.628652 ], [ 139.7202119, 35.6286718 ], [ 139.719721, 35.628891 ], [ 139.7193679, 35.629047 ], [ 139.7190157, 35.6292038 ], [ 139.7186644, 35.6293587 ], [ 139.7183494, 35.6295028 ], [ 139.7180772, 35.6296462 ], [ 139.717838, 35.6297917 ], [ 139.717617, 35.6299445 ], [ 139.7173894, 35.6301262 ], [ 139.7171807, 35.6303179 ], [ 139.7170042, 35.6304962 ], [ 139.7168517, 35.6306785 ], [ 139.7167082, 35.6308877 ], [ 139.7165762, 35.6311049 ], [ 139.7164624, 35.6313307 ], [ 139.7164146, 35.6314373 ], [ 139.7160549, 35.6327066 ], [ 139.7157395, 35.6338196 ], [ 139.7157253, 35.6338706 ], [ 139.7154946, 35.6347022 ], [ 139.7154024, 35.6350709 ], [ 139.7152974, 35.6354577 ], [ 139.7151855, 35.6358747 ], [ 139.7150758, 35.6362734 ], [ 139.7149697, 35.6367001 ], [ 139.7149358, 35.6369048 ], [ 139.7149125, 35.6370982 ], [ 139.7148787, 35.6374072 ], [ 139.714846, 35.637647 ], [ 139.7147912, 35.6378755 ], [ 139.7147189, 35.6380954 ], [ 139.7146548, 35.6382489 ], [ 139.7145813, 35.6383911 ], [ 139.7145568, 35.6384335 ], [ 139.7145113, 35.6385125 ], [ 139.7144845, 35.6385589 ], [ 139.7143629, 35.6387303 ], [ 139.7141286, 35.639055 ], [ 139.7140049, 35.6392353 ], [ 139.7138878, 35.6394249 ], [ 139.7137831, 35.6396186 ], [ 139.7136998, 35.6397976 ], [ 139.7136389, 35.6399383 ], [ 139.7135439, 35.6401575 ], [ 139.7134446, 35.6404093 ], [ 139.7132811, 35.6407684 ], [ 139.7130875, 35.6411454 ], [ 139.7128907, 35.6415048 ], [ 139.712689, 35.6418806 ], [ 139.7125031, 35.642224 ], [ 139.7123264, 35.6425512 ], [ 139.7122637, 35.6426669 ], [ 139.7115965, 35.6438525 ], [ 139.7112121, 35.6444758 ], [ 139.71083, 35.645119 ], [ 139.7105638, 35.6455743 ], [ 139.7100673, 35.6463903 ], [ 139.7096836, 35.64717 ], [ 139.7095033, 35.6475921 ], [ 139.7093536, 35.6479426 ], [ 139.7091664, 35.6483306 ], [ 139.7089874, 35.6486666 ], [ 139.7086592, 35.6492526 ], [ 139.7086181, 35.6493258 ], [ 139.7083786, 35.649761 ], [ 139.7081547, 35.6501769 ], [ 139.7079938, 35.6504551 ], [ 139.7078107, 35.6507443 ], [ 139.707742, 35.6508512 ], [ 139.7075953, 35.6510702 ], [ 139.7072238, 35.6515148 ], [ 139.7063785, 35.6525059 ], [ 139.7052863, 35.6536808 ], [ 139.704577, 35.6543471 ], [ 139.7043667, 35.654582 ], [ 139.7038959, 35.6551161 ], [ 139.703377, 35.6557234 ], [ 139.7029667, 35.6561896 ], [ 139.702597, 35.6566075 ], [ 139.7022401, 35.6570367 ], [ 139.7019168, 35.6574954 ], [ 139.7015603, 35.65807 ], [ 139.7013698, 35.658469 ], [ 139.7012154, 35.6590331 ], [ 139.7011973, 35.6591226 ], [ 139.7011756, 35.6593177 ], [ 139.7011547, 35.6596012 ], [ 139.7011694, 35.6598394 ], [ 139.7011985, 35.6601409 ], [ 139.7012359, 35.6604982 ], [ 139.7013027, 35.6612275 ], [ 139.7013439, 35.6619025 ], [ 139.7013525, 35.6620131 ], [ 139.7013653, 35.6621653 ], [ 139.7013786, 35.6623485 ], [ 139.7014641, 35.6632276 ], [ 139.7014677, 35.6632709 ], [ 139.7015041, 35.6635459 ], [ 139.7017503, 35.6653221 ], [ 139.7018243, 35.6658547 ], [ 139.7018688, 35.6661758 ], [ 139.7019172, 35.666524 ], [ 139.7020999, 35.6678354 ], [ 139.7022122, 35.6687223 ], [ 139.7023809, 35.6702284 ], [ 139.7024234, 35.6705221 ], [ 139.7024871, 35.6708316 ], [ 139.7025588, 35.6711551 ], [ 139.7026272, 35.671458 ], [ 139.7026956, 35.6717364 ], [ 139.7027425, 35.6718785 ], [ 139.7028022, 35.6720605 ], [ 139.7028783, 35.6722605 ], [ 139.7029141, 35.672358 ], [ 139.7030742, 35.6727431 ], [ 139.7035142, 35.673925 ], [ 139.7036018, 35.6742133 ], [ 139.7036938, 35.674486 ], [ 139.7037997, 35.6748095 ], [ 139.7038708, 35.675048 ], [ 139.7039206, 35.6752862 ], [ 139.7039569, 35.6755466 ], [ 139.7039736, 35.6757929 ], [ 139.7039675, 35.6760822 ], [ 139.7039511, 35.6763728 ], [ 139.7039229, 35.6768123 ], [ 139.7038946, 35.6772452 ], [ 139.7038606, 35.6776576 ], [ 139.7038137, 35.6780539 ], [ 139.7037487, 35.6784432 ], [ 139.7036576, 35.6788089 ], [ 139.703554, 35.6792007 ], [ 139.7034479, 35.6795971 ], [ 139.7033485, 35.6799497 ], [ 139.7033131, 35.6800822 ], [ 139.7032638, 35.680257 ], [ 139.7029134, 35.6815095 ], [ 139.7028557, 35.6816858 ], [ 139.7027979, 35.681869 ], [ 139.7027049, 35.6821 ], [ 139.7026082, 35.6823042 ], [ 139.7024937, 35.682546 ], [ 139.702336, 35.6828712 ], [ 139.7023199, 35.6829074 ], [ 139.7022865, 35.6829862 ], [ 139.7022163, 35.6831465 ], [ 139.7021489, 35.6833289 ], [ 139.701989, 35.683936 ], [ 139.7017833, 35.6847209 ], [ 139.70167, 35.6850527 ], [ 139.7015366, 35.6853655 ], [ 139.7013781, 35.685737 ], [ 139.7011322, 35.6863118 ], [ 139.7010424, 35.6865819 ], [ 139.7009103, 35.6870676 ], [ 139.7008157, 35.6873183 ], [ 139.7007099, 35.6875797 ], [ 139.7005548, 35.6879514 ], [ 139.700484, 35.6881479 ], [ 139.70032, 35.6886924 ], [ 139.7002594, 35.6889815 ], [ 139.7000893, 35.6897919 ], [ 139.7000459, 35.6900919 ], [ 139.7000079, 35.6904729 ], [ 139.6999797, 35.6908079 ], [ 139.6999732, 35.6910615 ], [ 139.6999936, 35.6917761 ], [ 139.6999999, 35.6920251 ], [ 139.6999839, 35.692298 ], [ 139.6999529, 35.6925653 ], [ 139.6999065, 35.6928164 ], [ 139.6998842, 35.6929143 ], [ 139.699773, 35.6933578 ], [ 139.6996552, 35.6938182 ], [ 139.699628, 35.6939218 ], [ 139.6995386, 35.6942662 ], [ 139.6994318, 35.6946894 ], [ 139.6993794, 35.69494 ], [ 139.6993445, 35.6951843 ], [ 139.6993238, 35.6953871 ], [ 139.6993118, 35.6956633 ], [ 139.6993179, 35.6959155 ], [ 139.6993596, 35.696201 ], [ 139.6994274, 35.6964827 ], [ 139.6994506, 35.6965865 ], [ 139.6995307, 35.6968195 ], [ 139.6995939, 35.6970123 ], [ 139.6996911, 35.6973115 ], [ 139.6997193, 35.6974032 ], [ 139.6997625, 35.6975352 ], [ 139.6998602, 35.6979197 ], [ 139.6999189, 35.698211 ], [ 139.6999762, 35.6985818 ], [ 139.700013, 35.6989329 ], [ 139.7000465, 35.6992551 ], [ 139.7000752, 35.6996509 ], [ 139.7000758, 35.6997223 ], [ 139.7001103, 35.7005299 ], [ 139.7001876, 35.7013028 ], [ 139.7001956, 35.7013824 ], [ 139.7002111, 35.7015371 ], [ 139.7002259, 35.7016852 ], [ 139.7003481, 35.7024085 ], [ 139.7004411, 35.7032294 ], [ 139.7005146, 35.7036384 ], [ 139.7005989, 35.7039949 ], [ 139.7006303, 35.7041184 ], [ 139.7006573, 35.704202 ], [ 139.7008497, 35.7047709 ], [ 139.7009827, 35.7051449 ], [ 139.7011081, 35.7054986 ], [ 139.7012443, 35.705877 ], [ 139.7013838, 35.7062667 ], [ 139.7015146, 35.7066433 ], [ 139.7016562, 35.7070436 ], [ 139.7017949, 35.7074522 ], [ 139.7019416, 35.7078504 ], [ 139.7019978, 35.7080119 ], [ 139.7020724, 35.7082225 ], [ 139.7021758, 35.7085192 ], [ 139.7022183, 35.7086413 ], [ 139.7023578, 35.7090293 ], [ 139.7024475, 35.7092777 ], [ 139.7025498, 35.7095923 ], [ 139.7028023, 35.7103051 ], [ 139.7029418, 35.7106988 ], [ 139.7031858, 35.7114606 ], [ 139.7033703, 35.7120572 ], [ 139.7035685, 35.7126995 ], [ 139.7036997, 35.7131249 ], [ 139.7037891, 35.7133889 ], [ 139.7038971, 35.7136864 ], [ 139.704164, 35.714284 ], [ 139.7043179, 35.7146524 ], [ 139.704359, 35.7147761 ], [ 139.7045694, 35.7153855 ], [ 139.7046316, 35.7155614 ], [ 139.7047649, 35.7159685 ], [ 139.7048406, 35.7162068 ], [ 139.7051845, 35.7173701 ], [ 139.7052293, 35.717519 ], [ 139.7055436, 35.7185635 ], [ 139.7057858, 35.7192819 ], [ 139.7059652, 35.719876 ], [ 139.7061713, 35.7205075 ], [ 139.7063474, 35.7210249 ], [ 139.706424, 35.7212031 ], [ 139.7065102, 35.7214037 ], [ 139.7067015, 35.7217865 ], [ 139.7067449, 35.7218734 ], [ 139.7070916, 35.7225202 ], [ 139.7078721, 35.7240169 ], [ 139.7082132, 35.7246595 ], [ 139.7083661, 35.7249537 ], [ 139.7085669, 35.7253284 ], [ 139.7087632, 35.7257163 ], [ 139.7089259, 35.7260506 ], [ 139.7090948, 35.7263967 ], [ 139.709288, 35.7267725 ], [ 139.7094881, 35.7271524 ], [ 139.7096419, 35.7274422 ], [ 139.7097958, 35.7277385 ], [ 139.7100245, 35.7282823 ], [ 139.7100744, 35.7284009 ], [ 139.7103303, 35.7289905 ], [ 139.7104762, 35.72933 ], [ 139.7106061, 35.7295899 ], [ 139.7109565, 35.7302577 ], [ 139.7116921, 35.7316592 ], [ 139.7120168, 35.7322521 ], [ 139.71219, 35.7325064 ], [ 139.7123849, 35.7327812 ], [ 139.7125467, 35.7329948 ], [ 139.712721, 35.7331974 ], [ 139.7128589, 35.733338 ], [ 139.7130013, 35.733461 ], [ 139.713276, 35.7336765 ], [ 139.7136725, 35.7339374 ], [ 139.7139129, 35.7340752 ], [ 139.7141944, 35.7341982 ], [ 139.7146858, 35.7343514 ], [ 139.7149966, 35.7344359 ], [ 139.7152666, 35.7344997 ], [ 139.7155455, 35.7345539 ], [ 139.7160769, 35.7346306 ], [ 139.7163776, 35.7346496 ], [ 139.7166477, 35.734657 ], [ 139.7168665, 35.7346496 ], [ 139.7170955, 35.7346348 ], [ 139.7173154, 35.7346144 ], [ 139.7175331, 35.7345784 ], [ 139.7178612, 35.7345229 ], [ 139.7182338, 35.7344276 ], [ 139.7182878, 35.7344133 ], [ 139.7185472, 35.7343444 ], [ 139.7198063, 35.7340077 ], [ 139.7212867, 35.7336147 ], [ 139.7222045, 35.7333724 ], [ 139.7227891, 35.73321 ], [ 139.7232786, 35.7330809 ], [ 139.7241574, 35.7328408 ], [ 139.7260809, 35.7323431 ], [ 139.7265585, 35.7322281 ], [ 139.7273324, 35.7320459 ], [ 139.7283573, 35.7317809 ], [ 139.7286156, 35.7317141 ], [ 139.7288565, 35.7316518 ], [ 139.7295828, 35.7314239 ], [ 139.730069, 35.7313025 ], [ 139.7303287, 35.7312367 ], [ 139.7307955, 35.7311205 ], [ 139.7311695, 35.7310388 ], [ 139.7314514, 35.7309932 ], [ 139.7317319, 35.7309582 ], [ 139.7320247, 35.7309454 ], [ 139.7323341, 35.73094 ], [ 139.7326209, 35.7309523 ], [ 139.7329137, 35.7309697 ], [ 139.7331827, 35.7309983 ], [ 139.7334949, 35.7310456 ], [ 139.7337488, 35.7310999 ], [ 139.7340127, 35.731167 ], [ 139.7342954, 35.7312546 ], [ 139.7345608, 35.7313486 ], [ 139.7348931, 35.7314852 ], [ 139.7352498, 35.7316353 ], [ 139.7355368, 35.7317532 ], [ 139.7361072, 35.7319879 ], [ 139.7365107, 35.7321555 ], [ 139.7369055, 35.7323178 ], [ 139.7373946, 35.7325274 ], [ 139.7378391, 35.7327242 ], [ 139.7382743, 35.7329192 ], [ 139.7386397, 35.7330937 ], [ 139.7386985, 35.7331224 ], [ 139.7390415, 35.7332898 ], [ 139.7391877, 35.7333612 ], [ 139.7394013, 35.7334579 ], [ 139.7396861, 35.7335869 ], [ 139.7415208, 35.734305 ], [ 139.7418932, 35.7344534 ], [ 139.7423029, 35.7346129 ], [ 139.7427025, 35.7347704 ], [ 139.7430727, 35.7349262 ], [ 139.743514, 35.7351085 ], [ 139.7439522, 35.7352834 ], [ 139.7444191, 35.7354589 ], [ 139.7448724, 35.7356319 ], [ 139.7452403, 35.7357731 ], [ 139.7456349, 35.7359405 ], [ 139.7460025, 35.7360887 ], [ 139.7463495, 35.7362397 ], [ 139.7465177, 35.7363181 ], [ 139.747219, 35.7366191 ], [ 139.7487011, 35.7372551 ], [ 139.7495096, 35.7375987 ], [ 139.7499198, 35.7377884 ], [ 139.7501475, 35.7379002 ], [ 139.7502125, 35.7379321 ], [ 139.7503646, 35.7380071 ], [ 139.7507384, 35.7381896 ], [ 139.7511343, 35.7383866 ], [ 139.7516053, 35.7386286 ], [ 139.7520048, 35.7388299 ], [ 139.7524421, 35.739056 ], [ 139.7525748, 35.7391261 ], [ 139.7529055, 35.7393017 ], [ 139.75333, 35.7395205 ], [ 139.7536675, 35.7396954 ], [ 139.7538251, 35.7397762 ], [ 139.7544571, 35.7401008 ], [ 139.7546452, 35.7401899 ], [ 139.7548269, 35.7402672 ], [ 139.7549093, 35.7402976 ], [ 139.7550734, 35.7403475 ], [ 139.7552863, 35.7404065 ], [ 139.7556212, 35.7404744 ], [ 139.7558013, 35.7404975 ], [ 139.7560497, 35.7405191 ], [ 139.7563102, 35.7405254 ], [ 139.7565553, 35.7405155 ], [ 139.756848, 35.7404786 ], [ 139.7571164, 35.74043 ], [ 139.7574113, 35.7403571 ], [ 139.7576896, 35.7402671 ], [ 139.7580478, 35.7401348 ], [ 139.7583849, 35.7399908 ], [ 139.7585889, 35.7398828 ], [ 139.7588295, 35.7397478 ], [ 139.7590768, 35.7395966 ], [ 139.7593075, 35.7394327 ], [ 139.7595669, 35.7392086 ], [ 139.7599059, 35.7389255 ], [ 139.7600983, 35.7387738 ], [ 139.7603055, 35.7385992 ], [ 139.7617268, 35.7373818 ], [ 139.7618902, 35.7372419 ], [ 139.7624429, 35.7367828 ], [ 139.7630941, 35.7362163 ], [ 139.7634099, 35.7359343 ], [ 139.7636893, 35.735678 ], [ 139.7639972, 35.7354025 ], [ 139.7642862, 35.7351385 ], [ 139.7645404, 35.7348873 ], [ 139.7647125, 35.7347095 ], [ 139.7647724, 35.7346476 ], [ 139.7649556, 35.7344515 ], [ 139.7651356, 35.7342542 ], [ 139.7653756, 35.7339901 ], [ 139.7655919, 35.7337274 ], [ 139.7658729, 35.7333686 ], [ 139.7660261, 35.733152 ], [ 139.7666829, 35.7322131 ], [ 139.7670034, 35.731755 ], [ 139.7674344, 35.7311718 ], [ 139.7687757, 35.7296255 ], [ 139.7692986, 35.7290466 ], [ 139.7695485, 35.7287912 ], [ 139.7698082, 35.7285462 ], [ 139.7704318, 35.7279884 ], [ 139.7710917, 35.727415 ], [ 139.7713068, 35.7272226 ], [ 139.7714754, 35.7270874 ], [ 139.7716336, 35.7269736 ], [ 139.7717271, 35.7269031 ], [ 139.7720017, 35.7267156 ], [ 139.7725579, 35.7263559 ], [ 139.7729741, 35.7260871 ], [ 139.7732983, 35.7258623 ], [ 139.7735987, 35.7256397 ], [ 139.7738918, 35.7253959 ], [ 139.7741544, 35.725155 ], [ 139.7744487, 35.7248786 ], [ 139.7747174, 35.7246318 ], [ 139.7751175, 35.7242626 ], [ 139.7753899, 35.7240069 ], [ 139.7757194, 35.7237018 ], [ 139.7761049, 35.7233415 ], [ 139.7764053, 35.7230591 ], [ 139.7767676, 35.7227284 ], [ 139.7770072, 35.7225122 ], [ 139.7774705, 35.7221124 ], [ 139.7778098, 35.7218202 ], [ 139.7780566, 35.7215931 ], [ 139.7782913, 35.7213611 ], [ 139.7786314, 35.7210215 ], [ 139.7790465, 35.7206069 ], [ 139.7792395, 35.7203959 ], [ 139.7794204, 35.7201548 ], [ 139.7795343, 35.7199518 ], [ 139.779628, 35.7197306 ], [ 139.7796906, 35.719533 ], [ 139.7797531, 35.7192684 ], [ 139.7797709, 35.7191052 ], [ 139.7797776, 35.7188714 ], [ 139.7797598, 35.718652 ], [ 139.7797166, 35.718347 ], [ 139.779686, 35.7182044 ], [ 139.7796321, 35.7179971 ], [ 139.7795485, 35.7177814 ], [ 139.7794408, 35.7175642 ], [ 139.7793061, 35.7173478 ], [ 139.7791232, 35.7171156 ], [ 139.7789597, 35.7169263 ], [ 139.7786963, 35.7166305 ], [ 139.7783932, 35.7162886 ], [ 139.7781038, 35.7159533 ], [ 139.7778965, 35.7157227 ], [ 139.7777025, 35.7155047 ], [ 139.7774657, 35.7152264 ], [ 139.7774413, 35.7152008 ], [ 139.7772688, 35.7150175 ], [ 139.7772105, 35.7149754 ], [ 139.777039, 35.7147821 ], [ 139.7768054, 35.7144948 ], [ 139.7761501, 35.7135677 ], [ 139.7758383, 35.713114 ], [ 139.7751392, 35.7121022 ], [ 139.7750361, 35.7119228 ], [ 139.7750055, 35.7118587 ], [ 139.7749303, 35.7117015 ], [ 139.7748141, 35.7114431 ], [ 139.7747277, 35.7111144 ], [ 139.7747064, 35.7109839 ], [ 139.7746817, 35.7107282 ], [ 139.7746929, 35.7104264 ], [ 139.7747937, 35.7098207 ], [ 139.7749052, 35.7092239 ], [ 139.7749324, 35.708989 ], [ 139.7749285, 35.7086863 ], [ 139.7749063, 35.7084355 ], [ 139.7748581, 35.7081291 ], [ 139.7747857, 35.7076835 ], [ 139.774715, 35.7072847 ], [ 139.7746504, 35.7069502 ], [ 139.7745307, 35.7062478 ], [ 139.7744993, 35.7060494 ], [ 139.7744718, 35.7058754 ], [ 139.7744523, 35.7057517 ], [ 139.7743695, 35.7052592 ], [ 139.774351, 35.7051491 ], [ 139.7743273, 35.7050086 ], [ 139.77432, 35.7049656 ], [ 139.7742937, 35.7048095 ], [ 139.7742782, 35.7047176 ], [ 139.7742268, 35.7043826 ], [ 139.7742143, 35.7043015 ], [ 139.7742044, 35.7042423 ], [ 139.7741439, 35.7038814 ], [ 139.7740964, 35.7036088 ], [ 139.7740672, 35.7034579 ], [ 139.77403, 35.703309 ], [ 139.7739291, 35.7029685 ], [ 139.7739146, 35.7029253 ], [ 139.7738242, 35.7026567 ], [ 139.7737598, 35.702465 ], [ 139.77363, 35.7020737 ], [ 139.7735853, 35.7019198 ], [ 139.7735659, 35.7018529 ], [ 139.7734963, 35.7015536 ], [ 139.7734845, 35.7014745 ], [ 139.773228, 35.699748 ], [ 139.7732152, 35.6996016 ], [ 139.7731976, 35.6994003 ], [ 139.7731289, 35.6989367 ], [ 139.7730593, 35.6983648 ], [ 139.7729738, 35.6976506 ], [ 139.7729486, 35.6974488 ], [ 139.7729258, 35.6972672 ], [ 139.7728553, 35.6967197 ], [ 139.7728301, 35.6965319 ], [ 139.7727859, 35.6963028 ], [ 139.7726853, 35.6958782 ], [ 139.7725549, 35.6954683 ], [ 139.7724485, 35.6951777 ], [ 139.7722772, 35.6947697 ], [ 139.7721487, 35.6944709 ], [ 139.7719658, 35.6939972 ], [ 139.7717326, 35.6934787 ], [ 139.771613, 35.6931946 ], [ 139.771479, 35.6928797 ], [ 139.7713266, 35.6925308 ], [ 139.7711501, 35.6921081 ], [ 139.7710145, 35.6917665 ], [ 139.7708663, 35.6914002 ], [ 139.770746, 35.6911077 ], [ 139.7706213, 35.6908054 ], [ 139.7705462, 35.6906234 ], [ 139.7704987, 35.6905083 ], [ 139.7704663, 35.6904298 ], [ 139.7703999, 35.6902687 ], [ 139.7702165, 35.6898239 ], [ 139.7701151, 35.6895943 ], [ 139.7700473, 35.6894408 ], [ 139.7700005, 35.6893178 ], [ 139.7699263, 35.6891479 ], [ 139.769847, 35.6889599 ], [ 139.7697834, 35.6888091 ], [ 139.7697516, 35.6887338 ], [ 139.7695737, 35.6883092 ], [ 139.7695511, 35.6882547 ], [ 139.7694344, 35.687974 ], [ 139.7693508, 35.6877728 ], [ 139.7691844, 35.6873646 ], [ 139.7689925, 35.6868524 ], [ 139.7688445, 35.6864714 ], [ 139.7687001, 35.6860844 ], [ 139.7685222, 35.6856395 ], [ 139.76817, 35.6849022 ], [ 139.7680244, 35.6845394 ], [ 139.7679905, 35.6844501 ], [ 139.7678405, 35.6840553 ], [ 139.7675705, 35.6834003 ], [ 139.7674833, 35.6832209 ], [ 139.7673689, 35.6829854 ], [ 139.7672097, 35.6826518 ], [ 139.7671704, 35.6825695 ], [ 139.7670592, 35.6823527 ], [ 139.7669523, 35.6821196 ], [ 139.7668857, 35.6819783 ], [ 139.7666095, 35.681244 ], [ 139.7663278, 35.6805011 ], [ 139.7662572, 35.6803015 ], [ 139.7661823, 35.6800573 ], [ 139.7661112, 35.6797515 ], [ 139.7659876, 35.6791764 ], [ 139.7658828, 35.6788473 ], [ 139.7657421, 35.6784908 ], [ 139.7654559, 35.6777259 ], [ 139.7653286, 35.6774036 ], [ 139.7651868, 35.6770801 ], [ 139.7650627, 35.6768337 ], [ 139.7649191, 35.6765986 ], [ 139.7647657, 35.6763954 ], [ 139.7645532, 35.6761529 ], [ 139.7644224, 35.6760235 ], [ 139.7642538, 35.6758716 ], [ 139.7640061, 35.6756751 ], [ 139.7637544, 35.6754705 ], [ 139.7633114, 35.6751318 ], [ 139.7630656, 35.6749443 ], [ 139.7628177, 35.6747552 ], [ 139.7624871, 35.674506 ], [ 139.7622161, 35.6742978 ], [ 139.7620188, 35.6741453 ], [ 139.761555, 35.6737797 ], [ 139.7614629, 35.6737018 ], [ 139.7613232, 35.673585 ], [ 139.7612023, 35.6734739 ], [ 139.7611234, 35.6734006 ], [ 139.7609172, 35.673194 ], [ 139.7608139, 35.673078 ], [ 139.7607303, 35.6729796 ], [ 139.7605259, 35.6727121 ], [ 139.7604519, 35.6726143 ], [ 139.7603405, 35.6724521 ], [ 139.7602794, 35.6723532 ], [ 139.7602129, 35.6722423 ], [ 139.7601108, 35.6720725 ], [ 139.7598469, 35.6716239 ], [ 139.7594473, 35.6709124 ], [ 139.7589959, 35.6700863 ], [ 139.7587358, 35.6696383 ], [ 139.7586394, 35.6694721 ], [ 139.758452, 35.6691332 ], [ 139.7583939, 35.6690226 ], [ 139.7583259, 35.6688885 ], [ 139.7582677, 35.6687578 ], [ 139.7582312, 35.6686567 ], [ 139.7581968, 35.6685628 ], [ 139.7581725, 35.6684914 ], [ 139.7581204, 35.668316 ], [ 139.7580757, 35.6680968 ], [ 139.7580518, 35.6679477 ], [ 139.7580333, 35.6677925 ], [ 139.7580069, 35.6673942 ], [ 139.7580014, 35.6672393 ], [ 139.7580261, 35.6669427 ], [ 139.7580848, 35.6665599 ], [ 139.7581445, 35.6661619 ], [ 139.7582272, 35.6656835 ], [ 139.7582559, 35.6655105 ], [ 139.7582938, 35.665267 ], [ 139.7584121, 35.6644362 ], [ 139.7584515, 35.6642321 ], [ 139.7584778, 35.6640533 ], [ 139.7584923, 35.6639548 ], [ 139.7585074, 35.6638734 ], [ 139.7585573, 35.6635077 ], [ 139.7585762, 35.6633347 ], [ 139.7585979, 35.6630848 ], [ 139.7586195, 35.6626343 ], [ 139.7586208, 35.6622846 ], [ 139.7586137, 35.6619401 ], [ 139.7585601, 35.6613015 ], [ 139.7584957, 35.6608503 ], [ 139.7584035, 35.6603508 ], [ 139.7582825, 35.6598312 ], [ 139.7582653, 35.6597629 ], [ 139.7582484, 35.6596957 ], [ 139.757863, 35.6581096 ], [ 139.7576251, 35.6571388 ], [ 139.7575012, 35.6566776 ], [ 139.7574177, 35.6563573 ], [ 139.7570793, 35.6551093 ], [ 139.7570092, 35.6548505 ], [ 139.7569372, 35.6545737 ], [ 139.756671, 35.6535577 ], [ 139.7565412, 35.6530815 ], [ 139.7564648, 35.6528079 ], [ 139.7564267, 35.65268 ], [ 139.7563122, 35.6523408 ], [ 139.7561584, 35.6519376 ], [ 139.7559883, 35.6515541 ], [ 139.7557788, 35.65114 ], [ 139.7555329, 35.6507224 ], [ 139.7553372, 35.6504138 ], [ 139.755117, 35.650108 ], [ 139.7549102, 35.6498479 ], [ 139.7546093, 35.6495224 ], [ 139.7540333, 35.649027 ], [ 139.7536685, 35.6487427 ], [ 139.7530111, 35.6482747 ], [ 139.7523496, 35.647911 ], [ 139.7515885, 35.6475461 ], [ 139.7508209, 35.6471748 ], [ 139.7499143, 35.6467427 ], [ 139.7497941, 35.6466862 ], [ 139.7491168, 35.6463565 ], [ 139.7488336, 35.6462311 ], [ 139.7485969, 35.6461484 ], [ 139.7476929, 35.6457223 ], [ 139.7473856, 35.6455774 ], [ 139.7469108, 35.6453444 ], [ 139.7462541, 35.6450079 ], [ 139.7459742, 35.6448546 ], [ 139.7457288, 35.6447202 ], [ 139.7450531, 35.6443422 ], [ 139.7445578, 35.6439979 ], [ 139.7443296, 35.6437995 ], [ 139.7441447, 35.6436258 ], [ 139.7435114, 35.6429321 ], [ 139.7432277, 35.6425793 ], [ 139.742876, 35.6420848 ], [ 139.7425925, 35.64167 ], [ 139.7424139, 35.6414004 ], [ 139.7420238, 35.6408387 ], [ 139.741621, 35.6402353 ], [ 139.7415342, 35.6400857 ], [ 139.7414011, 35.6398256 ], [ 139.7410019, 35.6389313 ], [ 139.7409656, 35.6388625 ], [ 139.740904, 35.6387458 ], [ 139.7408546, 35.6386522 ], [ 139.7405785, 35.6381497 ], [ 139.7400777, 35.637236 ], [ 139.7392451, 35.6357322 ], [ 139.7390475, 35.6353403 ], [ 139.7388807, 35.6349437 ], [ 139.7387305, 35.6345451 ], [ 139.7384787, 35.6337533 ], [ 139.7383909, 35.6334018 ], [ 139.7383106, 35.6327222 ], [ 139.7383137, 35.6320507 ], [ 139.7383445, 35.6316462 ], [ 139.738371, 35.6312272 ], [ 139.7383961, 35.6304701 ], [ 139.7384352, 35.6296635 ], [ 139.7384599, 35.6293213 ], [ 139.7384622, 35.6292898 ], [ 139.7385065, 35.6286608 ], [ 139.738572, 35.6277302 ], [ 139.7386267, 35.6269746 ], [ 139.7387044, 35.6264956 ], [ 139.7387412, 35.6261363 ], [ 139.738753, 35.6259127 ], [ 139.7387401, 35.6254012 ], [ 139.7386988, 35.6250619 ], [ 139.7386437, 35.6247539 ], [ 139.7385356, 35.6242818 ], [ 139.7384532, 35.6239789 ], [ 139.7383655, 35.6236251 ], [ 139.7380833, 35.6225813 ], [ 139.737754, 35.621393 ], [ 139.7376437, 35.6209952 ], [ 139.7373647, 35.6199951 ], [ 139.7372708, 35.6196402 ], [ 139.7371203, 35.6192438 ], [ 139.7370085, 35.6190117 ], [ 139.7368278, 35.6187017 ], [ 139.7365278, 35.618324 ], [ 139.7363642, 35.6181567 ], [ 139.7361841, 35.6179916 ], [ 139.7359795, 35.6178235 ], [ 139.7357749, 35.6176705 ], [ 139.7355619, 35.6175315 ], [ 139.7354029, 35.6174398 ], [ 139.7352965, 35.6173836 ], [ 139.7351801, 35.6173267 ], [ 139.7350655, 35.6172727 ], [ 139.7349515, 35.6172241 ], [ 139.7348036, 35.61717 ], [ 139.7346681, 35.6171271 ], [ 139.7344312, 35.6170569 ], [ 139.7342103, 35.6170014 ], [ 139.7339747, 35.6169504 ], [ 139.7338456, 35.616926 ], [ 139.7337136, 35.6169029 ], [ 139.7335822, 35.6168811 ], [ 139.7333586, 35.6168551 ], [ 139.7331978, 35.6168428 ], [ 139.7329847, 35.6168329 ], [ 139.732792, 35.6168307 ], [ 139.7325886, 35.6168394 ], [ 139.7322947, 35.6168649 ], [ 139.7319864, 35.6169115 ], [ 139.7317266, 35.6169676 ], [ 139.7314192, 35.6170558 ], [ 139.731167, 35.6171498 ], [ 139.7309141, 35.6172595 ], [ 139.7306746, 35.6173857 ], [ 139.7304795, 35.6175036 ], [ 139.7302469, 35.6176674 ], [ 139.7300359, 35.6178415 ], [ 139.7298547, 35.6180182 ], [ 139.7296066, 35.6183016 ], [ 139.7294578, 35.6184886 ], [ 139.7293895, 35.618571 ], [ 139.7290632, 35.6189646 ], [ 139.728662, 35.6194761 ], [ 139.7281188, 35.6201686 ] ] } } function updateDistances(line) { var coords = turf.getCoords(line); var travelled = 0; var distances = []; var i; for (i = 0; i < coords.length; i++) { if (i > 0) { travelled += turf.distance(coords[i - 1], coords[i]); } distances.push(travelled); } line.properties.distances = distances; } function getCoordAndBearing1(line, distance) { var coords = turf.getCoords(line); var distances = line.properties.distances; var length = coords.length; var index, coord, overshot, altitude, bearing; if (distance >= distances[length - 1]) { return { coord: coords[length - 1], altitude: coords[length - 1][2] || 0, bearing: turf.bearing(coords[length - 2], coords[length - 1]) }; } function findPoint(start, end) { var center; if (start === end - 1) { return start; } center = Math.floor((start + end) / 2); if (distance < distances[center]) { return findPoint(start, center); } else { return findPoint(center, end); } } index = findPoint(0, length - 1); coord = coords[index]; overshot = distance - distances[index]; altitude = coord[2] || 0; bearing = turf.bearing(coord, coords[index + 1]); return { coord: overshot === 0 ? coord : turf.getCoord(turf.destination(coord, overshot, bearing)), altitude: altitude + ((coords[index + 1][2] || 0) - altitude) * overshot / (distances[index + 1] - distances[index]), bearing: bearing }; } function getCoordAndBearing2(line, distance) { var coords = turf.getCoords(line); var distances = line.properties.distances; var length = coords.length; var index, coord, overshot, altitude, bearing, start, end, center; if (distance >= distances[length - 1]) { return { coord: coords[length - 1], altitude: coords[length - 1][2] || 0, bearing: turf.bearing(coords[length - 2], coords[length - 1]) }; } start = 0; end = length - 1; while (start !== end - 1) { center = Math.floor((start + end) / 2); if (distance < distances[center]) { end = center; } else { start = center; } } index = start; coord = coords[index]; overshot = distance - distances[index]; altitude = coord[2] || 0; bearing = turf.bearing(coord, coords[index + 1]); return { coord: overshot === 0 ? coord : turf.getCoord(turf.destination(coord, overshot, bearing)), altitude: altitude + ((coords[index + 1][2] || 0) - altitude) * overshot / (distances[index + 1] - distances[index]), bearing: bearing }; } updateDistances(line);
Tests:
test1
result1 = getCoordAndBearing1(line, 1);
test2
result2 = getCoordAndBearing2(line, 1);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
test1
test2
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
I'll provide an answer based on the provided JavaScript code and benchmark results. The code appears to be a comparison of two functions, `getCoordAndBearing1` and `getCoordAndBearing2`, which seem to calculate coordinates and bearings for a given line segment. The benchmarks compare the execution performance of these functions using Opera 63 on Windows. Based on the provided code and benchmark results, it seems that: * `getCoordAndBearing2` is slightly faster than `getCoordAndBearing1` (119 executions per second vs 76 executions per second for test2). * The difference in execution speed between the two functions may be due to differences in algorithmic complexity or optimization. However, without further analysis or context, it's difficult to provide a more specific explanation. If you'd like to know why one function is faster than the other, I can try to help with that!
Related benchmarks:
RXJS vs Vanilla
RXJS vs Vanilla v7.5.6
RXJS vs Vanilla v7.5.6 v2
RXJS 7.8.0 vs Vanilla
Comments
Confirm delete:
Do you really want to delete benchmark?