Skip to content

Commit

Permalink
Update benchmark files and link
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Gupta committed Aug 4, 2018
1 parent 4a72e8a commit 44bd5ff
Show file tree
Hide file tree
Showing 8 changed files with 445 additions and 98 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The package can be installed as:
```
mix run test/xirr_comparison_bench.exs
```
- The reports are available in the ```benchmarks``` folder.
- The reports are available [here](https://htmlpreview.github.io/?https://github.com/scripbox/ex-xirr/blob/master/benchmarks/output/results.html).

## Credits

Expand Down
30 changes: 15 additions & 15 deletions benchmarks/output/results_date_values_comparison.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions benchmarks/output/results_date_values_ex_xirr.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions benchmarks/output/results_date_values_legacy_finance.html

Large diffs are not rendered by default.

139 changes: 139 additions & 0 deletions benchmarks/output/results_new_date_values_comparison.html

Large diffs are not rendered by default.

126 changes: 126 additions & 0 deletions benchmarks/output/results_new_date_values_ex_xirr.html

Large diffs are not rendered by default.

126 changes: 126 additions & 0 deletions benchmarks/output/results_new_date_values_legacy_finance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<!DOCTYPE html>
<html>
<head>
<title>Benchee Report</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" type="text/css" href="assets/stylesheets/benchee.css">
<link rel="stylesheet" type="text/css" href="assets/fontello/css/fontello.css">

</head>

<body>

<div class="header">
<h1>benchee report</h1>

<span class="input-label">
new_date_values
</span>


<span class="version-note">
<a href="javascript:toggleSystemDataInfo();" title="Click to toggle system info">System info</a>
</span>

</div>


<article id="system-info" class="benchee-systeminfo" >
<h3>System info</h3>
<ul class="benchee-systeminfo-list">
<li>Elixir: 1.6.4</li>
<li>Erlang: 20.3.2</li>
<li>Operating system: macOS</li>
<li>Available memory: 8 GB</li>
<li>CPU Information: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz</li>
<li>Number of Available Cores: 4</li>
</ul>
</article>


<article>
<h2>
<a name="legacy finance"></a>
legacy finance
<a href="https://github.com/PragTob/benchee_html/wiki/Chart-Types#individual">
<i
class="benchee-help-icon icon-question-circle-o"
title="Graphs showing the individual run time distribution for legacy finance.
Run Times Histogram shows the distribution of occurrences of specific run times in buckets.
Raw Run Times shows all individual recorded run times in the order they were recorded in."
></i>
</a>
</h2>

<section>
<h3>Data Table</h3>
<table>
<thead>
<tr>
<th class="text-left">Name</th>
<th>Iterations per Second</th>
<th>Average</th>
<th>Deviation</th>
<th>median</th>
<th>minimum</th>
<th>maximum</th>
<th>Sample size</th>
</tr>
</thead>
<tbody>

<tr>

<td class="text-left">legacy finance</td>

<td>0.160 K</td>
<td>6.23 ms</td>
<td>±31.48%</td>
<td>5.60 ms</td>
<td>3.59 ms</td>
<td>31.69 ms</td>
<td>2406</td>
</tr>

</tbody>
</table>

</section>

<section class="benchee-plot-container">
<div id="sorted-run-times" class="plot" data-job-name="legacy finance"></div>
</section>
<section class="benchee-plot-container">
<div id="raw-run-times" class="plot" data-job-name="legacy finance"></div>
</section>
</article>

<footer>
<a href="https://github.com/PragTob/benchee" target="blank">benchee version: 0.13.1 </a>
<br/>
<a href="https://github.com/PragTob/benchee_html" target="blank">benchee_html version: 0.5.0</a>


</footer>


<script src="assets/javascripts/plotly-1.30.1.min.js"></script>
<script src="assets/javascripts/benchee.js"></script>



<script>
var measurements = {"run_times":[6126,5204,5283,6331,5468,5245,5806,5484,5814,7076,6793,5991,5666,5144,5888,5372,4675,5547,4965,5557,5244,4778,5789,6133,4802,5268,5910,4799,5828,5513,4857,5577,6506,5310,5211,6476,6813,5200,5308,5378,4866,6146,5748,5254,6106,5778,5554,4963,5450,5586,5238,5433,4910,4921,5467,4744,5602,6550,5110,5589,5481,5298,4915,5765,4725,5782,5804,5130,5645,5093,4863,5003,5232,4828,4966,5459,4901,5054,5161,5136,5121,4853,5563,5561,4704,5500,5131,5531,5490,5153,5048,4877,4665,5153,5198,5106,5046,4406,5041,4813,4922,4809,5243,5000,4989,4927,4790,4850,5130,5220,4992,4715,4794,5010,4813,6487,5044,5967,5140,5146,4997,5512,5270,5185,5495,5350,5335,4805,5088,4904,5222,5394,4887,5048,5308,4792,5197,5681,5304,4971,6077,6446,5562,5520,4679,6104,7328,6274,7257,6643,5939,6706,6196,7203,4731,5054,5152,7541,4875,7450,6406,5865,7708,5917,6783,8213,8216,8838,8410,9448,7455,5644,5374,7216,5235,5874,6695,5885,6266,7139,5511,7895,5557,5910,6214,5281,5813,5355,5365,5725,5320,5061,4936,5674,4837,5044,6184,5262,5667,8503,7868,8870,7792,7551,6057,6397,6322,5317,6779,5887,5084,6231,5211,6400,6104,5047,5707,6051,4925,7359,5398,4806,5154,4879,5133,5074,5295,5213,4949,4824,4990,4817,5910,5641,4681,5754,5981,5510,6447,5433,5186,7938,6482,6456,7673,7789,8040,9010,13060,7006,5555,5867,7759,5005,5925,7638,5789,6690,4975,5801,5632,5201,5110,5607,4327,4827,5880,5957,6811,7660,5408,5658,7435,5479,7127,5743,5180,6757,5345,5290,7827,5436,6148,7001,4968,8208,5831,5907,6976,5161,6515,6613,6057,6958,5716,6391,7460,5079,6136,6714,5389,5422,5381,5307,5079,6447,5915,6027,5186,6051,6299,4580,5733,6400,5458,6290,6419,5038,5800,6680,4735,5520,6446,4962,5351,5470,5267,4799,5264,5504,4835,5499,5808,5710,6434,5115,6174,6529,5325,7338,6326,5362,6405,5841,5968,5999,5549,6171,6839,4885,5436,6550,4871,5570,5979,4898,5973,6332,4831,5421,5286,5402,5180,5366,4763,4647,5644,5108,5204,5550,4896,4850,5457,5130,4965,4851,4987,5043,4951,5802,4880,4568,4862,5118,4712,4747,4971,5067,4890,5379,5314,4864,5819,4880,4915,5355,4905,5155,5133,5294,5570,6909,6257,5058,6135,6406,4993,5302,6285,4995,6193,6309,5586,6459,5214,5540,6158,5367,6699,6111,4964,6504,6464,6683,7332,5606,5480,6900,4759,5918,5928,5097,6155,6431,5523,6570,6678,5317,6123,5383,5068,6324,4856,4983,7310,5383,6072,6923,5217,6244,5357,4826,4864,5884,5210,4899,5197,5868,4592,5565,8222,5238,5515,10912,15193,6925,5719,7150,7022,6410,7384,5315,6782,6659,5917,7401,5995,5769,7534,5395,5663,6972,5750,7459,4440,6502,6427,5511,5590,6453,5549,5507,6444,6664,7390,5163,6228,7001,5966,6171,5947,6000,5504,6174,9780,7244,9320,5229,4625,5264,5520,4600,4911,6197,4956,5071,5205,4696,4875,4954,6811,5415,4823,5163,5087,5659,5431,5178,5043,5263,5076,4881,5242,5230,5482,4819,5267,5928,6815,4523,5468,6032,7311,5629,6839,5375,5113,6237,5230,6275,6277,5583,6024,4776,5738,6497,5776,4976,5975,5086,5912,6869,5558,6046,7014,5601,6720,6392,5450,6032,5614,6214,6884,4940,6825,6832,5821,5799,6487,6183,6682,4810,5646,6407,5631,5566,8141,16108,5780,6510,5742,6001,6957,5104,5955,5746,5299,5156,5236,4747,5247,5657,5095,5313,5874,4795,6507,6884,5258,5737,8286,12991,6034,5410,7029,5364,5810,6197,6657,8810,5513,7378,6914,7137,9207,6661,11625,13594,5642,6422,7192,5542,7752,5755,5268,6785,5287,6407,5877,4614,5413,5567,4504,5268,5485,6084,5791,5612,6746,9519,7605,7091,7896,5377,5753,5043,6261,5545,5174,5502,4966,5361,5855,5011,4962,4889,5754,5086,5590,5581,4611,5122,5324,5095,5147,4902,5445,5013,5076,5922,5304,4825,6558,5357,5723,5981,5271,6158,6038,5539,6114,6031,5365,6420,7414,7086,5445,5524,5253,7559,5539,5874,6768,5031,5729,7359,5794,6416,4643,5149,6685,5742,5200,5665,5123,5255,6176,5156,5714,5971,5488,5629,7191,4909,7656,6694,4998,6859,5611,5741,5865,4882,5311,6497,5335,5343,6496,5075,5557,6591,4952,5613,6795,5003,6935,6488,5100,6234,5028,5293,5842,7403,5007,6252,5379,5296,6282,4729,5374,6483,5047,5480,6241,5134,7847,28686,10188,17820,31687,7327,8743,5656,7626,5511,7634,17139,8951,12285,8259,9666,7565,6924,7684,8161,6610,4724,4888,5775,4929,5052,6501,5713,7780,6688,5088,5283,5219,4723,5386,4977,5045,4562,6912,4776,5627,5197,5622,4962,5239,4817,4901,5401,5193,4932,5982,4903,4679,4979,5006,5189,5095,5299,5239,4970,5563,4983,4678,5045,5181,5051,5108,4895,5067,4783,5663,4757,5040,5075,5119,4688,5718,5602,4845,5254,5406,4851,4984,6776,5054,4863,5761,4649,4644,6264,5639,4762,5531,4963,5571,5376,5043,4889,5110,5324,4820,4957,5012,5099,4706,5614,4976,4969,4979,4750,4651,5078,5275,4877,5436,5477,5416,4500,5332,4702,4952,5334,5252,4767,6126,5971,4938,5032,5294,5395,4722,5485,5800,5036,5031,5322,5193,5167,4886,4621,4680,5403,4761,5143,5340,5110,4478,5065,4704,4798,4979,5442,4685,4922,5400,5248,4729,4842,5472,5104,5783,5105,5031,4743,5147,4802,5070,5000,4955,4683,5105,5349,4860,4387,5278,4646,4703,5176,4987,4934,4695,5392,4784,5183,5383,4695,5054,4871,5164,4706,5278,5151,4719,4877,5073,4590,4559,5088,5398,4645,4803,5078,4982,4665,5754,5323,4854,5070,5227,4759,5523,5207,5164,5025,5543,5183,4991,5309,4881,4998,5331,5423,5033,4999,5746,5442,4938,5774,4967,4927,5458,4603,5382,5472,4924,5590,6186,8801,5306,8804,6409,8442,11832,7686,9711,6946,11464,7575,8273,6218,8267,7402,10022,7204,7857,6413,8507,6995,7449,9266,9849,6804,7009,8891,11855,7691,8056,5621,4319,6407,5565,4607,4267,4395,5304,4509,9823,6980,6225,5515,5732,5691,5211,5418,10912,11353,15064,4751,14606,7538,15379,11215,5108,12658,6291,11372,6406,9658,4940,10529,12701,6608,6726,8967,4344,6331,5790,9920,6361,8371,6716,7977,7301,6938,10143,9735,8015,8913,9006,7642,8141,8411,6506,14530,8847,9268,4766,3913,5094,5442,5075,6113,5434,5719,8472,6544,6687,5272,5104,7077,5515,5183,5279,5184,5478,5656,5330,4878,5756,4865,5144,5726,5159,5436,6141,4586,4990,6384,4618,4797,4493,6133,4708,5060,5167,5021,5586,5220,6886,12870,6089,9560,8000,5029,6166,6298,5715,5123,6027,5253,6160,6829,6905,5381,4780,5582,4786,5303,5469,4835,4669,5256,4699,4870,6443,4781,5769,5024,5146,5978,5221,5330,5094,4821,5832,4910,5364,6916,6407,5659,5512,4819,5365,6682,5333,5150,7351,5485,15633,8959,5410,5209,6765,5383,5592,7631,5301,5178,7885,5334,6270,7585,5237,7318,6519,7526,6359,5555,7318,5867,7716,5992,5419,7110,5708,5859,8940,15401,6267,7390,8280,7084,5655,5438,6521,6496,9100,8686,6813,6465,5564,12377,5816,8136,5807,5750,5619,5606,5569,6127,5435,5938,5093,4985,5414,7175,6973,7081,7030,6867,6362,7106,7179,6600,6779,6870,6187,6357,3594,4437,5808,4731,4806,5572,4491,5456,5602,4974,5207,5571,5223,5230,5413,5178,5350,5199,5707,5533,5622,13051,9193,8479,11191,8057,15658,11052,9178,8742,7027,8140,6007,8710,14899,9329,13553,6638,8722,6262,6840,12340,12202,9225,7118,7718,14864,10504,8942,13812,12061,12456,14238,9319,9342,4279,6972,7444,5593,10472,9925,11114,10427,8501,9732,8386,7423,7409,7376,7700,8013,6913,7815,3962,5019,7701,6418,8368,6825,8398,7478,7405,7473,6888,13580,18832,9671,6910,18254,7360,6785,8935,8020,9190,7102,6641,4762,4861,6631,6498,3733,9412,12127,11763,5151,10977,11647,5662,6294,8082,5144,10246,7419,12289,11157,6241,13278,6212,10929,13467,12409,20361,14802,5186,9475,6680,9441,11111,9037,8315,10008,5164,5579,7506,12327,5896,5437,5349,4919,9506,5925,4823,5643,5183,5948,9989,4844,5700,4800,4571,10004,5412,5021,6212,5581,9675,7417,10954,5941,10542,6182,5102,5744,4917,6965,9270,4834,5773,5138,17241,7018,5938,23111,15513,17553,6712,7655,12136,7675,12615,7061,12761,4373,6725,4231,5896,8814,5300,5415,5942,5674,6970,5731,4784,5817,4722,6552,10508,5134,5261,4810,5714,9251,4956,4949,6646,5557,5207,6532,5085,7121,7370,5554,11209,7329,12775,6790,9469,12111,5763,12595,21448,10850,5346,8585,5861,7306,8043,5787,8441,6620,8876,6461,9281,6521,7177,5705,6498,8807,5273,11441,5202,9136,4849,6404,9774,6014,9841,6035,9669,6513,9190,5403,10810,6094,8638,6399,10494,7932,10341,5191,12834,5572,8701,5556,7977,6871,7087,7660,5352,9011,5307,6621,8082,6292,9548,5873,8836,7454,10535,5333,5537,5757,5011,5707,7808,5500,5720,5822,6964,8472,6739,6006,5733,8460,7148,5552,6939,5856,6969,7395,6165,6946,5569,5823,8759,6826,7139,4960,5881,8232,5171,5942,5200,6158,10409,6053,6696,6206,6821,9287,7244,6519,4757,9796,8264,6462,5666,7959,9589,5973,5860,6053,6709,9915,5949,6546,5056,6726,9531,7349,5490,4527,12152,6198,5584,5104,4850,7985,6816,5358,5474,4886,6495,8638,5130,4728,5652,4662,5816,8056,5226,5496,4860,5185,8018,5981,5572,5676,4830,5801,8359,4848,5415,5662,5135,5899,7772,4733,5327,5249,4910,6143,7360,5205,5646,5000,5205,7623,6239,5528,5407,5847,6191,7164,5110,4547,5951,4732,5914,7968,4796,5373,5365,4999,6043,6997,5084,5708,6977,6305,8565,8507,6087,7366,6699,8380,6750,6592,5423,6918,6598,5387,5626,5097,6031,7197,5076,5110,6030,5313,7061,6908,5335,5241,5075,5460,8926,5604,5295,5966,4788,6005,7443,5829,5993,4742,5280,8612,5729,4798,5656,4994,5244,7960,5295,5513,5237,5147,5924,8273,5166,5014,5730,4947,6279,7512,5060,5833,4896,5743,8091,6335,5161,5528,5669,9751,5940,5427,6292,4871,7141,7996,5226,5491,4827,5439,8591,5228,4918,5931,4982,5723,8710,4810,4737,5980,4798,6600,7796,5559,5940,5363,5562,7895,5520,5187,5421,4919,5763,6938,5457,4733,5553,5210,5902,7556,5306,5293,5350,4962,5758,7683,5066,6427,4956,5303,7216,7979,4990,7034,4986,7887,6285,4758,5461,5219,4689,7767,6898,5268,5737,5497,6134,7891,5272,6122,5201,5435,7837,5376,5091,5529,4795,5753,7573,5758,5212,5640,4966,7356,7839,4888,5847,4941,5523,9587,5449,5699,5911,4906,8233,5824,5157,5656,5302,5503,8420,5484,4968,5677,4960,6522,8108,4954,5902,5090,4858,8016,5649,5257,6013,5274,6213,6959,5131,5133,5415,5056,5646,6808,6066,5131,5718,4890,7471,7064,4889,5526,4995,4945,7813,5898,5487,5663,5250,5863,6508,5507,5387,5485,5188,6001,6543,5665,5074,5617,5026,5913,6935,5282,5091,5321,5052,6066,6980,5462,5375,5510,5173,7045,6507,5289,5938,5191,5904,7205,5481,5256,6069,5036,6246,7802,4900,5165,5504,5070,6817,7148,4637,5859,5099,5548,7509,6122,5037,5639,4807,5592,8364,5738,5108,6277,4749,6966,6678,5155,5516,5192,5631,11640,5182,5606,4823,4936,9120,5854,5807,6619,5252,6516,7433,4790,5977,5181,5184,7741,5769,5222,5430,5126,5595,7565,5498,5096,5791,4893,6213,7690,5154,4853,5803,4642,7153,6430,5189,5413,5021,4996,8028,5682,4656,5518,5010,5452,6950,5525,5152,5499,4982,5954,8454,5505,5210,5404,5278,5945,8884,4885,5374,5058,5602,8497,5174,5134,5288,5194,5986,7613,5161,5128,5510,4762,6257,7494,5280,5516,5509,5062,7855,6098,5193,5569,4946,5131,8031,7095,7548,6736,6539,9408,6942,6909,6810,9013,7655,8622,7168,13741,7548,7520,7425,9368,7099,4874,6474,6376,6945,5016,4311,5375,6498,14729,5947,5671,5307,6016,6911,4889,5488,5790,5238,5993,7099,4965,5168,5351,5411,6193,7471,5266,5179,5384,4323,8703,6621,5024,5750,4995,5525,7738,5694,4992,5489,4865,5804,7482,5562,5129,5735,4084,6299,8155,5101,4958,5423,4949,7281,5341,5323,4944,5422,4997,7093,6178,4907,5464,5142,5226,8155,7969,5135,5119,4042,5366,6031,6396,5312,6286,4638,5658,7310,5474,4796,5956,4867,6495,7477,4919,5373,4886,4712,5711,7131,4941,4839,5685,4999,7179,6442,4976,5890,5099,5525,7837,5423,5489,5445,5295,6003,7580,5299,5277,5573,4944,5909,7293,4823,5925,4959,5191,9879,5437,5199,5819,5075,6059,7443,4786,4958,5837,4862,5764,8026,5028,5420,5462,4849,6566,7185,5081,5750,5304,5609,6715,5048,5176,5468,5156,6206,7151,5355,4833,5798,5727,6460,6640,5433,5079,5706,4734,6024,7126,5033,5281,5802,5072,6322,5687,5344,5592,5177,5014,5965,6471,5208,5098,5765,4819,5932,6442,5229,5092,5330,4813,6109,6721,4905,4508,5264,4670,5536,6218,5325,5085,5567,4870,5191,6670,5515,4855,5717,4914,6232,6756,5458,5312,5412,4776,6222,7715,5116,4641,4887,5251,5991,7167,5269,5266,6544,5260,6453,6937,5101,5552,4657,4835,6471,6792,5354,5133,4952,5541,7098,5339,5014,5429,4696,5102,10265,5903,5086,6322,4716,5784,7703,5511,5610,4786,5199,6610,6346,4807,5843,5015,5787,7661,5565,5019,5799,5487,5618,7182,5125,4610,5552,4711,5490,7235,5463,4786,5800,5402,6100,7486,5444,5387,5430,4842,6714,6804,5089,5464,5107,5292,7880,5444,4864,5428,4994,5414,8358,5692,5282,5359,5030,7015,7331,5452,5072,5480,4772,6058,7347,4827,5310,4997,4891,8324,6342,4983,5876,5129,4776,9020,5907,5179,5482,4786,7422,7157,5528,5760,7350,7232,7893,7540,6624,6171,9177,5483,4816,5366,5044,6058,6623,5230,5077,6358,4783,6638,7790,5599,6024,4926,4967,6901,5644,4709,5603,5311,5646,8003,4890,5049,5565,4980,5386,7409,5565,5545,5887,4936,6019,6767,5599,5164,5335,4884,6110,7118,4786,6341,6683],"statistics":{"average":6230.888611803824,"ips":160.49075217066078,"maximum":31687,"median":5.6e3,"minimum":3594,"mode":[5110,4786],"percentiles":{"50":5.6e3,"99":14600.679999999988},"sample_size":2406,"std_dev":1961.7395223351837,"std_dev_ips":50.529077169835794,"std_dev_ratio":0.3148410515024864}};
var runTimes = measurements.run_times;
var statistics = measurements.statistics;

var inputHeadline = " (new_date_values)"

drawRawRunTimeCharts(runTimes, inputHeadline, statistics);
drawRunTimeHistograms(runTimes, inputHeadline);
</script>
</body>
</html>
88 changes: 22 additions & 66 deletions test/xirr_comparison_bench.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,33 @@ ex_xirr_func = fn d, v -> ExXirr.xirr(d, v) end

inputs = %{
"date_values" => %{
v: [
1000,
2000,
-2000,
-4000,
1000,
2000,
-2000,
-4000,
1000,
2000,
-2000,
2000
],
d: [
{2011, 12, 07},
{2011, 12, 07},
{2011, 12, 07},
{2012, 01, 18},
{2012, 07, 03},
{2012, 07, 03},
{2012, 07, 19},
{2012, 07, 23},
{2012, 07, 23},
{2012, 07, 23},
{2012, 09, 11},
{2012, 09, 11},
{2012, 09, 11},
{2012, 09, 11},
{2012, 09, 12},
{2012, 09, 12},
{2012, 09, 12},
{2012, 09, 12},
{2013, 03, 11},
{2013, 03, 11},
{2013, 03, 11},
{2013, 03, 11},
{2013, 03, 28},
{2013, 03, 28},
{2013, 03, 28},
{2013, 03, 28},
{2013, 05, 21},
{2013, 05, 21},
{2013, 05, 21},
{2013, 05, 21},
{2013, 05, 21},
{2013, 05, 21},
{2013, 05, 21},
{2013, 05, 21}
],
v: [
105_187.06,
816_709.66,
479_069.684,
937_309.708,
88622.661,
100_000.0,
80000.0,
403_627.95,
508_117.9,
789_706.87,
-88622.661,
-789_706.871,
-688_117.9,
-403_627.95,
403_627.95,
789_706.871,
88622.661,
688_117.9,
45129.14,
26472.08,
51793.2,
126_605.59,
278_532.29,
99284.1,
58238.57,
113_945.03,
405_137.88,
-405_137.88,
165_738.23,
-165_738.23,
144_413.24,
84710.65,
-84710.65,
-144_413.24
{2013, 06, 21},
{2013, 07, 21},
{2013, 07, 24},
{2013, 08, 16},
{2013, 09, 21},
{2014, 01, 01},
{2014, 02, 10},
{2014, 03, 20}
]
}
}
Expand Down

0 comments on commit 44bd5ff

Please sign in to comment.