1621 lines
39 KiB
Plaintext
1621 lines
39 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import os, sys\n",
|
|
"import numpy as np\n",
|
|
"import pandas as pd\n",
|
|
"import json\n",
|
|
"pd.options.mode.chained_assignment = None\n",
|
|
"\n",
|
|
"import plotly.graph_objects as go\n",
|
|
"import plotly.io as pio\n",
|
|
"import plotly.express as px\n",
|
|
"from plotly.subplots import make_subplots\n",
|
|
"from unicodeit import replace as tex_to_unis\n",
|
|
"# sys.path.append(\"C:/Users/rurur/Desktop/p/python/plotly\")\n",
|
|
"# import plotly_setup"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 23,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"CPython-3.11.txt CPython-3.11_full.txt CPython-3.9.txt CPython-3.9_full.txt Pyodide.txt PyPy-3.9-v7.3.13.txt PyPy-3.9-v7.3.13_full.txt Xeus.txt\n",
|
|
"PyPy-3.9-v7.3.13 CPython-3.9 CPython-3.11 Pyodide Xeus\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"result_files = os.listdir(\"./results\")\n",
|
|
"result_titles = sorted(set([f.rstrip(\"full_.txt\") for f in result_files]))\n",
|
|
"result_titles[0], result_titles[2] = result_titles[2], result_titles[0]\n",
|
|
"print(*result_files)\n",
|
|
"print(*result_titles)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 24,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"df = pd.DataFrame()\n",
|
|
"funcs = [\"time_with_types\", \"time_no_types\", \"time_np\"]\n",
|
|
"funcs_titles = [f.lstrip(\"time_\") for f in funcs]\n",
|
|
"funcs_titles[-1] = \"numpy\"\n",
|
|
"for rtitle in result_titles:\n",
|
|
" with open(f\"results/{rtitle}.txt\", \"r\", encoding=\"utf-8\") as f:\n",
|
|
" result = json.load(f)\n",
|
|
" result_df = pd.DataFrame(dict(\n",
|
|
" interpreter=result[\"interpreter\"],\n",
|
|
" time=[result[func] for func in funcs],\n",
|
|
" funcs=funcs_titles,\n",
|
|
" test_mode=\"func\"\n",
|
|
" ))\n",
|
|
" df = pd.concat([df, result_df], ignore_index=True)\n",
|
|
"\n",
|
|
" fname_full_time = f\"{rtitle}_full.txt\"\n",
|
|
" if fname_full_time in result_files:\n",
|
|
" with open(f\"results/{fname_full_time}\", \"r\", encoding=\"utf-8\") as f:\n",
|
|
" times = [float(line) for line in f.readlines()]\n",
|
|
" result_df = pd.DataFrame(dict(\n",
|
|
" interpreter=result[\"interpreter\"],\n",
|
|
" time=times,\n",
|
|
" funcs=funcs_titles,\n",
|
|
" test_mode=\"full\"\n",
|
|
" ))\n",
|
|
" df = pd.concat([df, pd.DataFrame(result_df)], ignore_index=True)\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 25,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>interpreter</th>\n",
|
|
" <th>time</th>\n",
|
|
" <th>funcs</th>\n",
|
|
" <th>test_mode</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>PyPy-3.9-v7.3.13</td>\n",
|
|
" <td>0.099364</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>PyPy-3.9-v7.3.13</td>\n",
|
|
" <td>0.109924</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>PyPy-3.9-v7.3.13</td>\n",
|
|
" <td>3.676712</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>PyPy-3.9-v7.3.13</td>\n",
|
|
" <td>5.319000</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>PyPy-3.9-v7.3.13</td>\n",
|
|
" <td>3.638000</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>PyPy-3.9-v7.3.13</td>\n",
|
|
" <td>14.639000</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>CPython-3.9</td>\n",
|
|
" <td>1.445288</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>CPython-3.9</td>\n",
|
|
" <td>1.476920</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>CPython-3.9</td>\n",
|
|
" <td>1.407270</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>CPython-3.9</td>\n",
|
|
" <td>2.242000</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>10</th>\n",
|
|
" <td>CPython-3.9</td>\n",
|
|
" <td>1.502000</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>11</th>\n",
|
|
" <td>CPython-3.9</td>\n",
|
|
" <td>1.986000</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>12</th>\n",
|
|
" <td>CPython-3.11</td>\n",
|
|
" <td>0.820678</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>13</th>\n",
|
|
" <td>CPython-3.11</td>\n",
|
|
" <td>0.856216</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>14</th>\n",
|
|
" <td>CPython-3.11</td>\n",
|
|
" <td>1.202004</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>15</th>\n",
|
|
" <td>CPython-3.11</td>\n",
|
|
" <td>1.630000</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>16</th>\n",
|
|
" <td>CPython-3.11</td>\n",
|
|
" <td>1.166000</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>17</th>\n",
|
|
" <td>CPython-3.11</td>\n",
|
|
" <td>1.675000</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>full</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>18</th>\n",
|
|
" <td>piodide</td>\n",
|
|
" <td>1.785000</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>19</th>\n",
|
|
" <td>piodide</td>\n",
|
|
" <td>1.681000</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>20</th>\n",
|
|
" <td>piodide</td>\n",
|
|
" <td>2.833000</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>21</th>\n",
|
|
" <td>Xeus</td>\n",
|
|
" <td>1.155519</td>\n",
|
|
" <td>with_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>22</th>\n",
|
|
" <td>Xeus</td>\n",
|
|
" <td>1.038669</td>\n",
|
|
" <td>no_types</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>23</th>\n",
|
|
" <td>Xeus</td>\n",
|
|
" <td>1.272793</td>\n",
|
|
" <td>numpy</td>\n",
|
|
" <td>func</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" interpreter time funcs test_mode\n",
|
|
"0 PyPy-3.9-v7.3.13 0.099364 with_types func\n",
|
|
"1 PyPy-3.9-v7.3.13 0.109924 no_types func\n",
|
|
"2 PyPy-3.9-v7.3.13 3.676712 numpy func\n",
|
|
"3 PyPy-3.9-v7.3.13 5.319000 with_types full\n",
|
|
"4 PyPy-3.9-v7.3.13 3.638000 no_types full\n",
|
|
"5 PyPy-3.9-v7.3.13 14.639000 numpy full\n",
|
|
"6 CPython-3.9 1.445288 with_types func\n",
|
|
"7 CPython-3.9 1.476920 no_types func\n",
|
|
"8 CPython-3.9 1.407270 numpy func\n",
|
|
"9 CPython-3.9 2.242000 with_types full\n",
|
|
"10 CPython-3.9 1.502000 no_types full\n",
|
|
"11 CPython-3.9 1.986000 numpy full\n",
|
|
"12 CPython-3.11 0.820678 with_types func\n",
|
|
"13 CPython-3.11 0.856216 no_types func\n",
|
|
"14 CPython-3.11 1.202004 numpy func\n",
|
|
"15 CPython-3.11 1.630000 with_types full\n",
|
|
"16 CPython-3.11 1.166000 no_types full\n",
|
|
"17 CPython-3.11 1.675000 numpy full\n",
|
|
"18 piodide 1.785000 with_types func\n",
|
|
"19 piodide 1.681000 no_types func\n",
|
|
"20 piodide 2.833000 numpy func\n",
|
|
"21 Xeus 1.155519 with_types func\n",
|
|
"22 Xeus 1.038669 no_types func\n",
|
|
"23 Xeus 1.272793 numpy func"
|
|
]
|
|
},
|
|
"execution_count": 25,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"df"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 85,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"application/vnd.plotly.v1+json": {
|
|
"config": {
|
|
"plotlyServerURL": "https://plotly.com"
|
|
},
|
|
"data": [
|
|
{
|
|
"alignmentgroup": "True",
|
|
"hovertemplate": "test_mode=func<br>funcs=with_types<br>interpreter=%{x}<br>Time, s=%{y}<extra></extra>",
|
|
"legendgroup": "",
|
|
"marker": {
|
|
"color": "#636efa",
|
|
"pattern": {
|
|
"shape": ""
|
|
}
|
|
},
|
|
"name": "",
|
|
"offsetgroup": "",
|
|
"orientation": "v",
|
|
"showlegend": false,
|
|
"textposition": "auto",
|
|
"type": "bar",
|
|
"x": [
|
|
"PyPy-3.9-v7.3.13",
|
|
"CPython-3.9",
|
|
"CPython-3.11",
|
|
"piodide",
|
|
"Xeus"
|
|
],
|
|
"xaxis": "x4",
|
|
"y": [
|
|
0.099363702,
|
|
1.445288,
|
|
0.8206779,
|
|
1.785,
|
|
1.1555191
|
|
],
|
|
"yaxis": "y4"
|
|
},
|
|
{
|
|
"alignmentgroup": "True",
|
|
"hovertemplate": "test_mode=func<br>funcs=no_types<br>interpreter=%{x}<br>Time, s=%{y}<extra></extra>",
|
|
"legendgroup": "",
|
|
"marker": {
|
|
"color": "#636efa",
|
|
"pattern": {
|
|
"shape": ""
|
|
}
|
|
},
|
|
"name": "",
|
|
"offsetgroup": "",
|
|
"orientation": "v",
|
|
"showlegend": false,
|
|
"textposition": "auto",
|
|
"type": "bar",
|
|
"x": [
|
|
"PyPy-3.9-v7.3.13",
|
|
"CPython-3.9",
|
|
"CPython-3.11",
|
|
"piodide",
|
|
"Xeus"
|
|
],
|
|
"xaxis": "x5",
|
|
"y": [
|
|
0.109923603,
|
|
1.4769202,
|
|
0.8562159,
|
|
1.681,
|
|
1.0386694
|
|
],
|
|
"yaxis": "y5"
|
|
},
|
|
{
|
|
"alignmentgroup": "True",
|
|
"hovertemplate": "test_mode=func<br>funcs=numpy<br>interpreter=%{x}<br>Time, s=%{y}<extra></extra>",
|
|
"legendgroup": "",
|
|
"marker": {
|
|
"color": "#636efa",
|
|
"pattern": {
|
|
"shape": ""
|
|
}
|
|
},
|
|
"name": "",
|
|
"offsetgroup": "",
|
|
"orientation": "v",
|
|
"showlegend": false,
|
|
"textposition": "auto",
|
|
"type": "bar",
|
|
"x": [
|
|
"PyPy-3.9-v7.3.13",
|
|
"CPython-3.9",
|
|
"CPython-3.11",
|
|
"piodide",
|
|
"Xeus"
|
|
],
|
|
"xaxis": "x6",
|
|
"y": [
|
|
3.676712179,
|
|
1.4072699,
|
|
1.2020039,
|
|
2.833,
|
|
1.2727932
|
|
],
|
|
"yaxis": "y6"
|
|
},
|
|
{
|
|
"alignmentgroup": "True",
|
|
"hovertemplate": "test_mode=full<br>funcs=with_types<br>interpreter=%{x}<br>Time, s=%{y}<extra></extra>",
|
|
"legendgroup": "",
|
|
"marker": {
|
|
"color": "#636efa",
|
|
"pattern": {
|
|
"shape": ""
|
|
}
|
|
},
|
|
"name": "",
|
|
"offsetgroup": "",
|
|
"orientation": "v",
|
|
"showlegend": false,
|
|
"textposition": "auto",
|
|
"type": "bar",
|
|
"x": [
|
|
"PyPy-3.9-v7.3.13",
|
|
"CPython-3.9",
|
|
"CPython-3.11"
|
|
],
|
|
"xaxis": "x",
|
|
"y": [
|
|
5.319,
|
|
2.242,
|
|
1.63
|
|
],
|
|
"yaxis": "y"
|
|
},
|
|
{
|
|
"alignmentgroup": "True",
|
|
"hovertemplate": "test_mode=full<br>funcs=no_types<br>interpreter=%{x}<br>Time, s=%{y}<extra></extra>",
|
|
"legendgroup": "",
|
|
"marker": {
|
|
"color": "#636efa",
|
|
"pattern": {
|
|
"shape": ""
|
|
}
|
|
},
|
|
"name": "",
|
|
"offsetgroup": "",
|
|
"orientation": "v",
|
|
"showlegend": false,
|
|
"textposition": "auto",
|
|
"type": "bar",
|
|
"x": [
|
|
"PyPy-3.9-v7.3.13",
|
|
"CPython-3.9",
|
|
"CPython-3.11"
|
|
],
|
|
"xaxis": "x2",
|
|
"y": [
|
|
3.638,
|
|
1.502,
|
|
1.166
|
|
],
|
|
"yaxis": "y2"
|
|
},
|
|
{
|
|
"alignmentgroup": "True",
|
|
"hovertemplate": "test_mode=full<br>funcs=numpy<br>interpreter=%{x}<br>Time, s=%{y}<extra></extra>",
|
|
"legendgroup": "",
|
|
"marker": {
|
|
"color": "#636efa",
|
|
"pattern": {
|
|
"shape": ""
|
|
}
|
|
},
|
|
"name": "",
|
|
"offsetgroup": "",
|
|
"orientation": "v",
|
|
"showlegend": false,
|
|
"textposition": "auto",
|
|
"type": "bar",
|
|
"x": [
|
|
"PyPy-3.9-v7.3.13",
|
|
"CPython-3.9",
|
|
"CPython-3.11"
|
|
],
|
|
"xaxis": "x3",
|
|
"y": [
|
|
14.639,
|
|
1.986,
|
|
1.675
|
|
],
|
|
"yaxis": "y3"
|
|
}
|
|
],
|
|
"layout": {
|
|
"annotations": [
|
|
{
|
|
"font": {},
|
|
"showarrow": false,
|
|
"text": "with_types",
|
|
"x": 0.15333333333333332,
|
|
"xanchor": "center",
|
|
"xref": "paper",
|
|
"y": 1,
|
|
"yanchor": "bottom",
|
|
"yref": "paper"
|
|
},
|
|
{
|
|
"font": {},
|
|
"showarrow": false,
|
|
"text": "no_types",
|
|
"x": 0.49,
|
|
"xanchor": "center",
|
|
"xref": "paper",
|
|
"y": 1,
|
|
"yanchor": "bottom",
|
|
"yref": "paper"
|
|
},
|
|
{
|
|
"font": {},
|
|
"showarrow": false,
|
|
"text": "numpy",
|
|
"x": 0.8266666666666667,
|
|
"xanchor": "center",
|
|
"xref": "paper",
|
|
"y": 1,
|
|
"yanchor": "bottom",
|
|
"yref": "paper"
|
|
},
|
|
{
|
|
"font": {},
|
|
"showarrow": false,
|
|
"text": "full",
|
|
"textangle": 90,
|
|
"x": 0.98,
|
|
"xanchor": "left",
|
|
"xref": "paper",
|
|
"y": 0.2125,
|
|
"yanchor": "middle",
|
|
"yref": "paper"
|
|
},
|
|
{
|
|
"font": {},
|
|
"showarrow": false,
|
|
"text": "func",
|
|
"textangle": 90,
|
|
"x": 0.98,
|
|
"xanchor": "left",
|
|
"xref": "paper",
|
|
"y": 0.7875,
|
|
"yanchor": "middle",
|
|
"yref": "paper"
|
|
}
|
|
],
|
|
"barmode": "relative",
|
|
"font": {
|
|
"size": 13
|
|
},
|
|
"height": 620,
|
|
"legend": {
|
|
"tracegroupgap": 0
|
|
},
|
|
"margin": {
|
|
"b": 10,
|
|
"t": 20
|
|
},
|
|
"template": {
|
|
"data": {
|
|
"bar": [
|
|
{
|
|
"error_x": {
|
|
"color": "#2a3f5f"
|
|
},
|
|
"error_y": {
|
|
"color": "#2a3f5f"
|
|
},
|
|
"marker": {
|
|
"line": {
|
|
"color": "#E5ECF6",
|
|
"width": 0.5
|
|
},
|
|
"pattern": {
|
|
"fillmode": "overlay",
|
|
"size": 10,
|
|
"solidity": 0.2
|
|
}
|
|
},
|
|
"type": "bar"
|
|
}
|
|
],
|
|
"barpolar": [
|
|
{
|
|
"marker": {
|
|
"line": {
|
|
"color": "#E5ECF6",
|
|
"width": 0.5
|
|
},
|
|
"pattern": {
|
|
"fillmode": "overlay",
|
|
"size": 10,
|
|
"solidity": 0.2
|
|
}
|
|
},
|
|
"type": "barpolar"
|
|
}
|
|
],
|
|
"carpet": [
|
|
{
|
|
"aaxis": {
|
|
"endlinecolor": "#2a3f5f",
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"minorgridcolor": "white",
|
|
"startlinecolor": "#2a3f5f"
|
|
},
|
|
"baxis": {
|
|
"endlinecolor": "#2a3f5f",
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"minorgridcolor": "white",
|
|
"startlinecolor": "#2a3f5f"
|
|
},
|
|
"type": "carpet"
|
|
}
|
|
],
|
|
"choropleth": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"type": "choropleth"
|
|
}
|
|
],
|
|
"contour": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"colorscale": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
],
|
|
"type": "contour"
|
|
}
|
|
],
|
|
"contourcarpet": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"type": "contourcarpet"
|
|
}
|
|
],
|
|
"heatmap": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"colorscale": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
],
|
|
"type": "heatmap"
|
|
}
|
|
],
|
|
"heatmapgl": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"colorscale": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
],
|
|
"type": "heatmapgl"
|
|
}
|
|
],
|
|
"histogram": [
|
|
{
|
|
"marker": {
|
|
"pattern": {
|
|
"fillmode": "overlay",
|
|
"size": 10,
|
|
"solidity": 0.2
|
|
}
|
|
},
|
|
"type": "histogram"
|
|
}
|
|
],
|
|
"histogram2d": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"colorscale": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
],
|
|
"type": "histogram2d"
|
|
}
|
|
],
|
|
"histogram2dcontour": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"colorscale": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
],
|
|
"type": "histogram2dcontour"
|
|
}
|
|
],
|
|
"mesh3d": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"type": "mesh3d"
|
|
}
|
|
],
|
|
"parcoords": [
|
|
{
|
|
"line": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "parcoords"
|
|
}
|
|
],
|
|
"pie": [
|
|
{
|
|
"automargin": true,
|
|
"type": "pie"
|
|
}
|
|
],
|
|
"scatter": [
|
|
{
|
|
"fillpattern": {
|
|
"fillmode": "overlay",
|
|
"size": 10,
|
|
"solidity": 0.2
|
|
},
|
|
"type": "scatter"
|
|
}
|
|
],
|
|
"scatter3d": [
|
|
{
|
|
"line": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scatter3d"
|
|
}
|
|
],
|
|
"scattercarpet": [
|
|
{
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scattercarpet"
|
|
}
|
|
],
|
|
"scattergeo": [
|
|
{
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scattergeo"
|
|
}
|
|
],
|
|
"scattergl": [
|
|
{
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scattergl"
|
|
}
|
|
],
|
|
"scattermapbox": [
|
|
{
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scattermapbox"
|
|
}
|
|
],
|
|
"scatterpolar": [
|
|
{
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scatterpolar"
|
|
}
|
|
],
|
|
"scatterpolargl": [
|
|
{
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scatterpolargl"
|
|
}
|
|
],
|
|
"scatterternary": [
|
|
{
|
|
"marker": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"type": "scatterternary"
|
|
}
|
|
],
|
|
"surface": [
|
|
{
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
},
|
|
"colorscale": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
],
|
|
"type": "surface"
|
|
}
|
|
],
|
|
"table": [
|
|
{
|
|
"cells": {
|
|
"fill": {
|
|
"color": "#EBF0F8"
|
|
},
|
|
"line": {
|
|
"color": "white"
|
|
}
|
|
},
|
|
"header": {
|
|
"fill": {
|
|
"color": "#C8D4E3"
|
|
},
|
|
"line": {
|
|
"color": "white"
|
|
}
|
|
},
|
|
"type": "table"
|
|
}
|
|
]
|
|
},
|
|
"layout": {
|
|
"annotationdefaults": {
|
|
"arrowcolor": "#2a3f5f",
|
|
"arrowhead": 0,
|
|
"arrowwidth": 1
|
|
},
|
|
"autotypenumbers": "strict",
|
|
"coloraxis": {
|
|
"colorbar": {
|
|
"outlinewidth": 0,
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"colorscale": {
|
|
"diverging": [
|
|
[
|
|
0,
|
|
"#8e0152"
|
|
],
|
|
[
|
|
0.1,
|
|
"#c51b7d"
|
|
],
|
|
[
|
|
0.2,
|
|
"#de77ae"
|
|
],
|
|
[
|
|
0.3,
|
|
"#f1b6da"
|
|
],
|
|
[
|
|
0.4,
|
|
"#fde0ef"
|
|
],
|
|
[
|
|
0.5,
|
|
"#f7f7f7"
|
|
],
|
|
[
|
|
0.6,
|
|
"#e6f5d0"
|
|
],
|
|
[
|
|
0.7,
|
|
"#b8e186"
|
|
],
|
|
[
|
|
0.8,
|
|
"#7fbc41"
|
|
],
|
|
[
|
|
0.9,
|
|
"#4d9221"
|
|
],
|
|
[
|
|
1,
|
|
"#276419"
|
|
]
|
|
],
|
|
"sequential": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
],
|
|
"sequentialminus": [
|
|
[
|
|
0,
|
|
"#0d0887"
|
|
],
|
|
[
|
|
0.1111111111111111,
|
|
"#46039f"
|
|
],
|
|
[
|
|
0.2222222222222222,
|
|
"#7201a8"
|
|
],
|
|
[
|
|
0.3333333333333333,
|
|
"#9c179e"
|
|
],
|
|
[
|
|
0.4444444444444444,
|
|
"#bd3786"
|
|
],
|
|
[
|
|
0.5555555555555556,
|
|
"#d8576b"
|
|
],
|
|
[
|
|
0.6666666666666666,
|
|
"#ed7953"
|
|
],
|
|
[
|
|
0.7777777777777778,
|
|
"#fb9f3a"
|
|
],
|
|
[
|
|
0.8888888888888888,
|
|
"#fdca26"
|
|
],
|
|
[
|
|
1,
|
|
"#f0f921"
|
|
]
|
|
]
|
|
},
|
|
"colorway": [
|
|
"#636efa",
|
|
"#EF553B",
|
|
"#00cc96",
|
|
"#ab63fa",
|
|
"#FFA15A",
|
|
"#19d3f3",
|
|
"#FF6692",
|
|
"#B6E880",
|
|
"#FF97FF",
|
|
"#FECB52"
|
|
],
|
|
"font": {
|
|
"color": "#2a3f5f"
|
|
},
|
|
"geo": {
|
|
"bgcolor": "white",
|
|
"lakecolor": "white",
|
|
"landcolor": "#E5ECF6",
|
|
"showlakes": true,
|
|
"showland": true,
|
|
"subunitcolor": "white"
|
|
},
|
|
"hoverlabel": {
|
|
"align": "left"
|
|
},
|
|
"hovermode": "closest",
|
|
"mapbox": {
|
|
"style": "light"
|
|
},
|
|
"paper_bgcolor": "white",
|
|
"plot_bgcolor": "#E5ECF6",
|
|
"polar": {
|
|
"angularaxis": {
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"ticks": ""
|
|
},
|
|
"bgcolor": "#E5ECF6",
|
|
"radialaxis": {
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"scene": {
|
|
"xaxis": {
|
|
"backgroundcolor": "#E5ECF6",
|
|
"gridcolor": "white",
|
|
"gridwidth": 2,
|
|
"linecolor": "white",
|
|
"showbackground": true,
|
|
"ticks": "",
|
|
"zerolinecolor": "white"
|
|
},
|
|
"yaxis": {
|
|
"backgroundcolor": "#E5ECF6",
|
|
"gridcolor": "white",
|
|
"gridwidth": 2,
|
|
"linecolor": "white",
|
|
"showbackground": true,
|
|
"ticks": "",
|
|
"zerolinecolor": "white"
|
|
},
|
|
"zaxis": {
|
|
"backgroundcolor": "#E5ECF6",
|
|
"gridcolor": "white",
|
|
"gridwidth": 2,
|
|
"linecolor": "white",
|
|
"showbackground": true,
|
|
"ticks": "",
|
|
"zerolinecolor": "white"
|
|
}
|
|
},
|
|
"shapedefaults": {
|
|
"line": {
|
|
"color": "#2a3f5f"
|
|
}
|
|
},
|
|
"ternary": {
|
|
"aaxis": {
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"ticks": ""
|
|
},
|
|
"baxis": {
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"ticks": ""
|
|
},
|
|
"bgcolor": "#E5ECF6",
|
|
"caxis": {
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"ticks": ""
|
|
}
|
|
},
|
|
"title": {
|
|
"x": 0.05
|
|
},
|
|
"xaxis": {
|
|
"automargin": true,
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"ticks": "",
|
|
"title": {
|
|
"standoff": 15
|
|
},
|
|
"zerolinecolor": "white",
|
|
"zerolinewidth": 2
|
|
},
|
|
"yaxis": {
|
|
"automargin": true,
|
|
"gridcolor": "white",
|
|
"linecolor": "white",
|
|
"ticks": "",
|
|
"title": {
|
|
"standoff": 15
|
|
},
|
|
"zerolinecolor": "white",
|
|
"zerolinewidth": 2
|
|
}
|
|
}
|
|
},
|
|
"width": 800,
|
|
"xaxis": {
|
|
"anchor": "y",
|
|
"domain": [
|
|
0,
|
|
0.30666666666666664
|
|
],
|
|
"showticklabels": true,
|
|
"title": {}
|
|
},
|
|
"xaxis2": {
|
|
"anchor": "y2",
|
|
"domain": [
|
|
0.33666666666666667,
|
|
0.6433333333333333
|
|
],
|
|
"showticklabels": true,
|
|
"title": {}
|
|
},
|
|
"xaxis3": {
|
|
"anchor": "y3",
|
|
"domain": [
|
|
0.6733333333333333,
|
|
0.98
|
|
],
|
|
"showticklabels": true,
|
|
"title": {}
|
|
},
|
|
"xaxis4": {
|
|
"anchor": "y4",
|
|
"domain": [
|
|
0,
|
|
0.30666666666666664
|
|
],
|
|
"showticklabels": true,
|
|
"title": {}
|
|
},
|
|
"xaxis5": {
|
|
"anchor": "y5",
|
|
"domain": [
|
|
0.33666666666666667,
|
|
0.6433333333333333
|
|
],
|
|
"showticklabels": true,
|
|
"title": {}
|
|
},
|
|
"xaxis6": {
|
|
"anchor": "y6",
|
|
"domain": [
|
|
0.6733333333333333,
|
|
0.98
|
|
],
|
|
"showticklabels": true,
|
|
"title": {}
|
|
},
|
|
"yaxis": {
|
|
"anchor": "x",
|
|
"domain": [
|
|
0,
|
|
0.425
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"title": {
|
|
"text": "Time, s"
|
|
}
|
|
},
|
|
"yaxis2": {
|
|
"anchor": "x2",
|
|
"domain": [
|
|
0,
|
|
0.425
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"showticklabels": false
|
|
},
|
|
"yaxis3": {
|
|
"anchor": "x3",
|
|
"domain": [
|
|
0,
|
|
0.425
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"showticklabels": false
|
|
},
|
|
"yaxis4": {
|
|
"anchor": "x4",
|
|
"domain": [
|
|
0.575,
|
|
1
|
|
],
|
|
"range": [
|
|
0,
|
|
4
|
|
],
|
|
"title": {
|
|
"text": "Time, s"
|
|
}
|
|
},
|
|
"yaxis5": {
|
|
"anchor": "x5",
|
|
"domain": [
|
|
0.575,
|
|
1
|
|
],
|
|
"range": [
|
|
0,
|
|
4
|
|
],
|
|
"showticklabels": false
|
|
},
|
|
"yaxis6": {
|
|
"anchor": "x6",
|
|
"domain": [
|
|
0.575,
|
|
1
|
|
],
|
|
"range": [
|
|
0,
|
|
4
|
|
],
|
|
"showticklabels": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"fig = px.bar(df,\n",
|
|
" x=\"interpreter\",\n",
|
|
" y=\"time\",\n",
|
|
" facet_col=\"funcs\",\n",
|
|
" facet_row=\"test_mode\",\n",
|
|
" facet_row_spacing=0.15,\n",
|
|
" facet_col_spacing=0.03,\n",
|
|
" labels=dict(time=\"Time, s\")\n",
|
|
").update_layout(\n",
|
|
" width=800, height=620,\n",
|
|
" margin=dict(b=10, t=20),\n",
|
|
" # title=dict(text=\"Results of Testing\"),\n",
|
|
" font=dict(size=13)\n",
|
|
").update_yaxes(\n",
|
|
" matches=None,\n",
|
|
").update_yaxes(\n",
|
|
" # showticklabels=True,\n",
|
|
" row=1,\n",
|
|
" range=(0, 16)\n",
|
|
").update_yaxes(\n",
|
|
" # showticklabels=True,\n",
|
|
" row=2,\n",
|
|
" range=(0, 4)\n",
|
|
").update_xaxes(\n",
|
|
" matches=None,\n",
|
|
" showticklabels=True,\n",
|
|
" title=None\n",
|
|
").for_each_annotation(\n",
|
|
" lambda a: a.update(text=a.text.split(\"=\")[-1])\n",
|
|
")\n",
|
|
"fig.write_image(\"result.png\", scale=2.5)\n",
|
|
"# fig.layout.yaxis.matches = 'y'\n",
|
|
"# fig.layout.yaxis1.matches = 'y1'\n",
|
|
"fig.show()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.10.10"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|