Skip to content

Instantly share code, notes, and snippets.

@catawbasam
Created June 18, 2014 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catawbasam/1fd6a82605a54b052425 to your computer and use it in GitHub Desktop.
Save catawbasam/1fd6a82605a54b052425 to your computer and use it in GitHub Desktop.
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:6fe564fd5807e59cc459bd6bedc3dd57d1c56c392f17ce2401e0ba3677d8161a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ProfileView Example and abstractarray.jl :\n",
"#### slow anonymous functions in float(A::AbstractArray) and complex(A::AbstractArray) \n",
"https://github.com/JuliaLang/julia/blob/master/base/profile.jl"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"using ProfileView"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### example function from https://github.com/timholy/ProfileView.jl :"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"function profile_test(n)\n",
" for i = 1:n\n",
" A = randn(100,100,20)\n",
" m = maximum(A)\n",
" Afft = fft(A)\n",
" Am = mapslices(sum, A, 2)\n",
" B = A[:,:,5]\n",
" Bsort = mapslices(sort, B, 1)\n",
" b = rand(100)\n",
" C = B.*b\n",
" end\n",
"end\n",
"\n",
"profile_test(1) # run once to trigger compilation\n",
"Profile.clear() # in case we have any previous profiling data\n",
"@profile profile_test(10)"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### !!! anonymous functions in abstractarray.jl:319 !!!"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"ProfileView.view()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 3,
"svg": [
"<?xml version=\"1.0\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<svg version=\"1.1\" width=\"1200\" height=\"235\" onload=\"init(evt)\" viewBox=\"0 0 1200 235\" xmlns=\"http://www.w3.org/2000/svg\" >\n",
"<defs >\n",
" <linearGradient id=\"background\" y1=\"0\" y2=\"1\" x1=\"0\" x2=\"0\" >\n",
" <stop stop-color=\"#eeeeee\" offset=\"5%\" />\n",
" <stop stop-color=\"#eeeeb0\" offset=\"95%\" />\n",
" </linearGradient>\n",
"</defs>\n",
"<style type=\"text/css\">\n",
" rect[rx]:hover { stroke:black; stroke-width:1; }\n",
" text:hover { stroke:black; stroke-width:1; stroke-opacity:0.35; }\n",
"</style>\n",
"<script type=\"text/ecmascript\">\n",
"<![CDATA[\n",
" var details;\n",
" function init(evt) { details = document.getElementById(\"details\").firstChild; }\n",
" function s(info) { details.nodeValue = info; }\n",
" function c() { details.nodeValue = ' '; }\n",
"]]>\n",
"</script>\n",
"<rect x=\"0.0\" y=\"0\" width=\"1200.0\" height=\"235.0\" fill=\"url(#background)\" />\n",
"<text text-anchor=\"middle\" x=\"600\" y=\"24\" font-size=\"17\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" >Profile results</text>\n",
"<text text-anchor=\"left\" x=\"10\" y=\"218\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" >Function:</text>\n",
"<text text-anchor=\"\" x=\"70\" y=\"218\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" id=\"details\" > </text>\n",
"<rect x=\"11.38335287221571\" y=\"180.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('convert in complex.jl:22')\" onmouseout=\"c()\"/><rect x=\"12.76670574443142\" y=\"180.0\" width=\"1175.8499413833529\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('include_string in loading.jl:97')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"16.76670574443142\" y=\"191.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('include_string in loading.jl:97')\" onmouseout=\"c()\">\n",
"include_string in loading.jl:97\n",
"</text>\n",
"<rect x=\"12.76670574443142\" y=\"165.0\" width=\"1175.8499413833529\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in profile.jl:14')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"16.76670574443142\" y=\"176.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('anonymous in profile.jl:14')\" onmouseout=\"c()\">\n",
"anonymous in profile.jl:14\n",
"</text>\n",
"<rect x=\"12.76670574443142\" y=\"150.0\" width=\"37.35052754982415\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('profile_test in In[2]:3')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"16.76670574443142\" y=\"161.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('profile_test in In[2]:3')\" onmouseout=\"c()\">\n",
"prof..\n",
"</text>\n",
"<rect x=\"50.11723329425557\" y=\"150.0\" width=\"1040.2813599062133\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('profile_test in In[2]:5')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"54.11723329425557\" y=\"161.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('profile_test in In[2]:5')\" onmouseout=\"c()\">\n",
"profile_test in In[2]:5\n",
"</text>\n",
"<rect x=\"1090.398593200469\" y=\"150.0\" width=\"42.883939038687004\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('profile_test in In[2]:5')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"1094.398593200469\" y=\"161.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('profile_test in In[2]:5')\" onmouseout=\"c()\">\n",
"profi..\n",
"</text>\n",
"<rect x=\"1133.282532239156\" y=\"150.0\" width=\"49.80070339976555\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('profile_test in In[2]:6')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"1137.282532239156\" y=\"161.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('profile_test in In[2]:6')\" onmouseout=\"c()\">\n",
"profil..\n",
"</text>\n",
"<rect x=\"1183.0832356389215\" y=\"150.0\" width=\"5.533411488862839\" height=\"15.0\" fill=\"rgb(210,171,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('profile_test in In[2]:8')\" onmouseout=\"c()\"/><rect x=\"12.76670574443142\" y=\"135.0\" width=\"2.766705744431418\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:597')\" onmouseout=\"c()\"/><rect x=\"15.533411488862837\" y=\"135.0\" width=\"33.20046893317702\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randn! in random.jl:249')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"19.53341148886284\" y=\"146.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('randn! in random.jl:249')\" onmouseout=\"c()\">\n",
"rand..\n",
"</text>\n",
"<rect x=\"48.73388042203986\" y=\"135.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randn! in random.jl:249')\" onmouseout=\"c()\"/><rect x=\"50.11723329425557\" y=\"135.0\" width=\"1040.2813599062133\" height=\"15.0\" fill=\"rgb(57,255,110)\" rx=\"2\" ry=\"2\" onmouseover=\"s('map_promote in abstractarray.jl:1288')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"54.11723329425557\" y=\"146.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('map_promote in abstractarray.jl:1288')\" onmouseout=\"c()\">\n",
"map_promote in abstractarray.jl:1288\n",
"</text>\n",
"<rect x=\"1090.398593200469\" y=\"135.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(0,0,122)\" rx=\"2\" ry=\"2\" onmouseover=\"s('fft! in fftw.jl:431')\" onmouseout=\"c()\"/><rect x=\"1091.7819460726846\" y=\"135.0\" width=\"41.500586166471294\" height=\"15.0\" fill=\"rgb(0,88,98)\" rx=\"2\" ry=\"2\" onmouseover=\"s('fft! in fftw.jl:432')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"1095.7819460726846\" y=\"146.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('fft! in fftw.jl:432')\" onmouseout=\"c()\">\n",
"fft! ..\n",
"</text>\n",
"<rect x=\"1133.282532239156\" y=\"135.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('mapslices in abstractarray.jl:1233')\" onmouseout=\"c()\"/><rect x=\"1134.6658851113716\" y=\"135.0\" width=\"48.41735052754984\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('mapslices in abstractarray.jl:1245')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"1138.6658851113716\" y=\"146.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('mapslices in abstractarray.jl:1245')\" onmouseout=\"c()\">\n",
"mapsli..\n",
"</text>\n",
"<rect x=\"1183.0832356389215\" y=\"135.0\" width=\"5.533411488862839\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('mapslices in abstractarray.jl:1245')\" onmouseout=\"c()\"/><rect x=\"16.91676436107855\" y=\"120.0\" width=\"8.300117233294252\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:597')\" onmouseout=\"c()\"/><rect x=\"25.2168815943728\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:597')\" onmouseout=\"c()\"/><rect x=\"26.60023446658851\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:598')\" onmouseout=\"c()\"/><rect x=\"27.98358733880422\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:600')\" onmouseout=\"c()\"/><rect x=\"29.36694021101993\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:600')\" onmouseout=\"c()\"/><rect x=\"30.75029308323564\" y=\"120.0\" width=\"6.916764361078549\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:600')\" onmouseout=\"c()\"/><rect x=\"37.66705744431419\" y=\"120.0\" width=\"4.150058616647122\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:600')\" onmouseout=\"c()\"/><rect x=\"41.81711606096131\" y=\"120.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:600')\" onmouseout=\"c()\"/><rect x=\"44.58382180539273\" y=\"120.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(210,171,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('randmtzig_randn in librandom.jl:602')\" onmouseout=\"c()\"/><rect x=\"50.11723329425557\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(109,81,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:319')\" onmouseout=\"c()\"/><rect x=\"51.50058616647128\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(109,81,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:319')\" onmouseout=\"c()\"/><rect x=\"52.88393903868699\" y=\"120.0\" width=\"125.88511137162955\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1265')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"56.88393903868699\" y=\"131.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('promote_to! in abstractarray.jl:1265')\" onmouseout=\"c()\">\n",
"promote_to! in abst..\n",
"</text>\n",
"<rect x=\"178.76905041031654\" y=\"120.0\" width=\"864.5955451348184\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1265')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"182.76905041031654\" y=\"131.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('promote_to! in abstractarray.jl:1265')\" onmouseout=\"c()\">\n",
"promote_to! in abstractarray.jl:1265\n",
"</text>\n",
"<rect x=\"1043.364595545135\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1265')\" onmouseout=\"c()\"/><rect x=\"1044.7479484173507\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1265')\" onmouseout=\"c()\"/><rect x=\"1046.1313012895664\" y=\"120.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1265')\" onmouseout=\"c()\"/><rect x=\"1048.8980070339978\" y=\"120.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1266')\" onmouseout=\"c()\"/><rect x=\"1051.6647127784292\" y=\"120.0\" width=\"16.600234466588518\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1266')\" onmouseout=\"c()\"/><rect x=\"1068.2649472450178\" y=\"120.0\" width=\"11.066822977725451\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1267')\" onmouseout=\"c()\"/><rect x=\"1079.3317702227432\" y=\"120.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(210,171,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1268')\" onmouseout=\"c()\"/><rect x=\"1083.4818288393903\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(210,171,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1268')\" onmouseout=\"c()\"/><rect x=\"1084.865181711606\" y=\"120.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(109,81,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1277')\" onmouseout=\"c()\"/><rect x=\"1089.0152403282532\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(109,81,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('promote_to! in abstractarray.jl:1277')\" onmouseout=\"c()\"/><rect x=\"1090.398593200469\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('Plan in fftw.jl:301')\" onmouseout=\"c()\"/><rect x=\"1133.282532239156\" y=\"120.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('vcat in abstractarray.jl:655')\" onmouseout=\"c()\"/><rect x=\"1134.6658851113716\" y=\"120.0\" width=\"48.41735052754984\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('cartesianmap in abstractarray.jl:1162')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"1138.6658851113716\" y=\"131.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('cartesianmap in abstractarray.jl:1162')\" onmouseout=\"c()\">\n",
"cartes..\n",
"</text>\n",
"<rect x=\"1183.0832356389215\" y=\"120.0\" width=\"5.533411488862839\" height=\"15.0\" fill=\"rgb(210,171,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('cartesianmap in abstractarray.jl:1155')\" onmouseout=\"c()\"/><rect x=\"178.76905041031654\" y=\"105.0\" width=\"861.828839390387\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:319')\" onmouseout=\"c()\"/><text text-anchor=\"\" x=\"182.76905041031654\" y=\"116.5\" font-size=\"12\" font-family=\"Verdana\" fill=\"rgb(0,0,0)\" onmouseover=\"s('anonymous in abstractarray.jl:319')\" onmouseout=\"c()\">\n",
"anonymous in abstractarray.jl:319\n",
"</text>\n",
"<rect x=\"1040.5978898007036\" y=\"105.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:319')\" onmouseout=\"c()\"/><rect x=\"1041.9812426729193\" y=\"105.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:319')\" onmouseout=\"c()\"/><rect x=\"1090.398593200469\" y=\"105.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('dims_howmany in fftw.jl:254')\" onmouseout=\"c()\"/><rect x=\"1133.282532239156\" y=\"105.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(57,255,110)\" rx=\"2\" ry=\"2\" onmouseover=\"s('cat in abstractarray.jl:622')\" onmouseout=\"c()\"/><rect x=\"1134.6658851113716\" y=\"105.0\" width=\"5.533411488862839\" height=\"15.0\" fill=\"rgb(0,0,122)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1249')\" onmouseout=\"c()\"/><rect x=\"1140.1992966002344\" y=\"105.0\" width=\"6.916764361078549\" height=\"15.0\" fill=\"rgb(0,88,98)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1250')\" onmouseout=\"c()\"/><rect x=\"1147.116060961313\" y=\"105.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1251')\" onmouseout=\"c()\"/><rect x=\"1151.2661195779601\" y=\"105.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1251')\" onmouseout=\"c()\"/><rect x=\"1152.6494724501758\" y=\"105.0\" width=\"17.983587338804227\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1252')\" onmouseout=\"c()\"/><rect x=\"1170.63305978898\" y=\"105.0\" width=\"8.300117233294259\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1252')\" onmouseout=\"c()\"/><rect x=\"1178.9331770222743\" y=\"105.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1252')\" onmouseout=\"c()\"/><rect x=\"1181.6998827667057\" y=\"105.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1252')\" onmouseout=\"c()\"/><rect x=\"1183.0832356389215\" y=\"105.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(57,255,110)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1250')\" onmouseout=\"c()\"/><rect x=\"1184.4665885111372\" y=\"105.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(0,0,122)\" rx=\"2\" ry=\"2\" onmouseover=\"s('anonymous in abstractarray.jl:1252')\" onmouseout=\"c()\"/><rect x=\"189.83587338804222\" y=\"90.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('convert in complex.jl:22')\" onmouseout=\"c()\"/><rect x=\"1090.398593200469\" y=\"90.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('unique in set.jl:103')\" onmouseout=\"c()\"/><rect x=\"1134.6658851113716\" y=\"90.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('vcat in ./abstractarray.jl:503')\" onmouseout=\"c()\"/><rect x=\"1140.1992966002344\" y=\"90.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(210,171,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('setindex! in array.jl:345')\" onmouseout=\"c()\"/><rect x=\"1152.6494724501758\" y=\"90.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(109,81,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('getindex in multidimensional.jl:49')\" onmouseout=\"c()\"/><rect x=\"1155.4161781946073\" y=\"90.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('getindex in multidimensional.jl:50')\" onmouseout=\"c()\"/><rect x=\"1158.1828839390387\" y=\"90.0\" width=\"9.683470105509969\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('getindex in multidimensional.jl:50')\" onmouseout=\"c()\"/><rect x=\"1167.8663540445486\" y=\"90.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('getindex in multidimensional.jl:50')\" onmouseout=\"c()\"/><rect x=\"1170.63305978898\" y=\"90.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('setindex! in multidimensional.jl:61')\" onmouseout=\"c()\"/><rect x=\"1184.4665885111372\" y=\"90.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('sort in sort.jl:321')\" onmouseout=\"c()\"/><rect x=\"1090.398593200469\" y=\"75.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('setindex! in dict.jl:551')\" onmouseout=\"c()\"/><rect x=\"1152.6494724501758\" y=\"75.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('checkbounds in abstractarray.jl:92')\" onmouseout=\"c()\"/><rect x=\"1154.0328253223915\" y=\"75.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(57,255,110)\" rx=\"2\" ry=\"2\" onmouseover=\"s('trailingsize in abstractarray.jl:55')\" onmouseout=\"c()\"/><rect x=\"1158.1828839390387\" y=\"75.0\" width=\"8.300117233294259\" height=\"15.0\" fill=\"rgb(0,0,122)\" rx=\"2\" ry=\"2\" onmouseover=\"s('_getindex! in multidimensional.jl:37')\" onmouseout=\"c()\"/><rect x=\"1166.483001172333\" y=\"75.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(0,88,98)\" rx=\"2\" ry=\"2\" onmouseover=\"s('_getindex! in multidimensional.jl:292')\" onmouseout=\"c()\"/><rect x=\"1170.63305978898\" y=\"75.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('checkbounds in abstractarray.jl:92')\" onmouseout=\"c()\"/><rect x=\"1172.0164126611958\" y=\"75.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('checkbounds in abstractarray.jl:94')\" onmouseout=\"c()\"/><rect x=\"1173.3997655334115\" y=\"75.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('checkbounds in abstractarray.jl:94')\" onmouseout=\"c()\"/><rect x=\"1184.4665885111372\" y=\"75.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(57,255,110)\" rx=\"2\" ry=\"2\" onmouseover=\"s('sort! in sort.jl:428')\" onmouseout=\"c()\"/><rect x=\"1090.398593200469\" y=\"60.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('ht_keyindex2 in dict.jl:495')\" onmouseout=\"c()\"/><rect x=\"1184.4665885111372\" y=\"60.0\" width=\"4.150058616647129\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('fpsort! in sort.jl:424')\" onmouseout=\"c()\"/><rect x=\"1184.4665885111372\" y=\"45.0\" width=\"2.7667057444314196\" height=\"15.0\" fill=\"rgb(140,0,69)\" rx=\"2\" ry=\"2\" onmouseover=\"s('sort! in sort.jl:247')\" onmouseout=\"c()\"/><rect x=\"1187.2332942555686\" y=\"45.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(255,121,177)\" rx=\"2\" ry=\"2\" onmouseover=\"s('sort! in sort.jl:269')\" onmouseout=\"c()\"/><rect x=\"1184.4665885111372\" y=\"30.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(120,90,252)\" rx=\"2\" ry=\"2\" onmouseover=\"s('sort! in sort.jl:233')\" onmouseout=\"c()\"/><rect x=\"1185.8499413833529\" y=\"30.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(8,139,0)\" rx=\"2\" ry=\"2\" onmouseover=\"s('sort! in sort.jl:234')\" onmouseout=\"c()\"/><rect x=\"1187.2332942555686\" y=\"30.0\" width=\"1.3833528722157098\" height=\"15.0\" fill=\"rgb(0,167,175)\" rx=\"2\" ry=\"2\" onmouseover=\"s('sort! in sort.jl:247')\" onmouseout=\"c()\"/>\n",
"</svg>\n"
],
"text": [
"ProfileData(853x11 Array{RGB,2}:\n",
" RGB(0.0,0.0,0.0) \u2026 RGB(0.0,0.0,0.0) \n",
" RGB(0.47034102652604887,0.3548485806834522,0.9887746568367514) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) \u2026 RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" \u22ee \u22f1 \u22ee \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) \u2026 RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.0,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.47034102652604887,0.3548485806834522,0.9887746568367514)\n",
" RGB(0.032953713619640335,0.546608346245583,0.0) \u2026 RGB(0.032953713619640335,0.546608346245583,0.0) \n",
" RGB(0.032953713619640335,0.546608346245583,0.0) RGB(0.0,0.6553320810805296,0.686843949904043) \n",
" RGB(0.0,0.6553320810805296,0.686843949904043) RGB(0.0,0.0,0.0) ,[0x00007f88e842f955=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",600,false),0x00007f88e8433324=>LineInfo(\"mapslices\",\"abstractarray.jl\",1233,false),0x00007f88ee84671a=>LineInfo(\"???\",\"???\",-293312742,true),0x00007f88ee842dee=>LineInfo(\"???\",\"???\",-293327378,true),0x00007f88e13a5cb7=>LineInfo(\"???\",\"???\",-516268873,true),0x00007f88ee8769ee=>LineInfo(\"???\",\"???\",-293115410,true),0x00007f88ee8a0a04=>LineInfo(\"???\",\"???\",-292943356,true),0x00007f88ee842c52=>LineInfo(\"???\",\"???\",-293327790,true),0x00007f88e84387d6=>LineInfo(\"anonymous\",\"abstractarray.jl\",1252,false),0x00007f88ee89f690=>LineInfo(\"???\",\"???\",-292948336,true),0x00007f88ee83c5b0=>LineInfo(\"???\",\"???\",-293354064,true),0x00007f88e84304bf=>LineInfo(\"???\",\"???\",-398261057,true),0x00007f88e8438bbd=>LineInfo(\"setindex!\",\"multidimensional.jl\",61,false),0x00007f88ee842aee=>LineInfo(\"???\",\"???\",-293328146,true),0x00007f88ee8a0b30=>LineInfo(\"???\",\"???\",-292943056,true),0x00007f88ee84a8e5=>LineInfo(\"???\",\"???\",-293295899,true),0x00007f88ee842acd=>LineInfo(\"???\",\"???\",-293328179,true),0x00007f88ee84a8b0=>LineInfo(\"???\",\"???\",-293295952,true),0x00007f88e841fd37=>LineInfo(\"include_string\",\"loading.jl\",97,false),0x00007f88ee89f787=>LineInfo(\"???\",\"???\",-292948089,true),0x00007f88ee83906b=>LineInfo(\"???\",\"???\",-293367701,true),0x00007f88ee89e347=>LineInfo(\"???\",\"???\",-292953273,true),0x00007f88e842f5b6=>LineInfo(\"map_promote\",\"abstractarray.jl\",1288,false),0x00007f88ee88adc7=>LineInfo(\"???\",\"???\",-293032505,true),0x00007f88ee8a0826=>LineInfo(\"???\",\"???\",-292943834,true),0x00007f88e1485ec0=>LineInfo(\"???\",\"???\",-515350848,true),0x00007f88ee842ce8=>LineInfo(\"???\",\"???\",-293327640,true),0x00007f88ee842c66=>LineInfo(\"???\",\"???\",-293327770,true),0x00007f88ee8391a3=>LineInfo(\"???\",\"???\",-293367389,true),0x00007f88e148fdc1=>LineInfo(\"???\",\"???\",-515310143,true),0x00007f88ee842d91=>LineInfo(\"???\",\"???\",-293327471,true),0x00007f88ee84a8e3=>LineInfo(\"???\",\"???\",-293295901,true),0x00007f88ee8931b3=>LineInfo(\"???\",\"???\",-292998733,true),0x00007f88e842fe07=>LineInfo(\"convert\",\"complex.jl\",22,false),0x00007f88e843860e=>LineInfo(\"anonymous\",\"abstractarray.jl\",1251,false),0x00007f88ee8a08c3=>LineInfo(\"???\",\"???\",-292943677,true),0x00007f88e843b57c=>LineInfo(\"anonymous\",\"abstractarray.jl\",1250,false),0x00007f88e8430bea=>LineInfo(\"dims_howmany\",\"fftw.jl\",254,false),0x00007f88ee84a8db=>LineInfo(\"???\",\"???\",-293295909,true),0x00007f88e8430544=>LineInfo(\"fft!\",\"fftw.jl\",431,false),0x00007f88e842f858=>LineInfo(\"randn!\",\"random.jl\",249,false),0x00007f88e13ae996=>LineInfo(\"???\",\"???\",-516232810,true),0x00007f88ee842c56=>LineInfo(\"???\",\"???\",-293327786,true),0x00007f88e843a4e0=>LineInfo(\"sort!\",\"sort.jl\",428,false),0x00007f88ee84a1a1=>LineInfo(\"???\",\"???\",-293297759,true),0x00007f88e84301ec=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1265,false),0x00007f88ee842c5a=>LineInfo(\"???\",\"???\",-293327782,true),0x00007f88ee89f474=>LineInfo(\"???\",\"???\",-292948876,true),0x00007f88ee84a8c7=>LineInfo(\"???\",\"???\",-293295929,true),0x00007f88ee8467bf=>LineInfo(\"???\",\"???\",-293312577,true),0x00007f88ee89f2d7=>LineInfo(\"???\",\"???\",-292949289,true),0x00007f88ee839057=>LineInfo(\"???\",\"???\",-293367721,true),0x00007f88ee850237=>LineInfo(\"???\",\"???\",-293273033,true),0x00007f88ee8391af=>LineInfo(\"???\",\"???\",-293367377,true),0x00007f88ee83c5e2=>LineInfo(\"???\",\"???\",-293354014,true),0x00007f88ee839199=>LineInfo(\"???\",\"???\",-293367399,true),0x00007f88ee842b72=>LineInfo(\"???\",\"???\",-293328014,true),0x00007f88e842b91e=>LineInfo(\"profile_test\",\"In[2]\",3,false),0x00007f88e84300a3=>LineInfo(\"???\",\"???\",-398262109,true),0x00007f88ee89f73e=>LineInfo(\"???\",\"???\",-292948162,true),0x00007f88ee839081=>LineInfo(\"???\",\"???\",-293367679,true),0x00007f88e8435440=>LineInfo(\"???\",\"???\",-398240704,true),0x00007f88e84389a6=>LineInfo(\"setindex!\",\"array.jl\",345,false),0x00007f88ee8a0055=>LineInfo(\"???\",\"???\",-292945835,true),0x00007f88e43006f0=>LineInfo(\"???\",\"???\",-466614544,true),0x00007f88e842fdb0=>LineInfo(\"???\",\"???\",-398262864,true),0x00007f88e842fbb6=>LineInfo(\"anonymous\",\"abstractarray.jl\",319,false),0x00007f88ee8a085f=>LineInfo(\"???\",\"???\",-292943777,true),0x00007f88ee842ae1=>LineInfo(\"???\",\"???\",-293328159,true),0x00007f88ee842c14=>LineInfo(\"???\",\"???\",-293327852,true),0x00007f88ee89fdb3=>LineInfo(\"???\",\"???\",-292946509,true),0x00007f88ee89f471=>LineInfo(\"???\",\"???\",-292948879,true),0x00007f88e842fb05=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",602,false),0x00007f88ee88ba04=>LineInfo(\"???\",\"???\",-293029372,true),0x00007f88e149d9c2=>LineInfo(\"???\",\"???\",-515253822,true),0x00007f88ee8a087d=>LineInfo(\"???\",\"???\",-292943747,true),0x00007f88ee8a0956=>LineInfo(\"???\",\"???\",-292943530,true),0x00007f88e842f943=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",600,false),0x00007f88ee842d7d=>LineInfo(\"???\",\"???\",-293327491,true),0x00007f88e14bf9fb=>LineInfo(\"???\",\"???\",-515114501,true),0x00007f88e842f949=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",600,false),0x00007f88ee842bdf=>LineInfo(\"???\",\"???\",-293327905,true),0x00007f88e842fdcb=>LineInfo(\"???\",\"???\",-398262837,true),0x00007f88e8430558=>LineInfo(\"fft!\",\"fftw.jl\",432,false),0x00007f88ee8390e0=>LineInfo(\"???\",\"???\",-293367584,true),0x00007f88ee842b68=>LineInfo(\"???\",\"???\",-293328024,true),0x00007f88ee84c525=>LineInfo(\"???\",\"???\",-293288667,true),0x00007f88ee839040=>LineInfo(\"???\",\"???\",-293367744,true),0x00007f88e1485f4b=>LineInfo(\"???\",\"???\",-515350709,true),0x00007f88e843242d=>LineInfo(\"ht_keyindex2\",\"dict.jl\",495,false),0x00007f88e13b3e24=>LineInfo(\"???\",\"???\",-516211164,true),0x00007f88e84385fc=>LineInfo(\"anonymous\",\"abstractarray.jl\",1250,false),0x00007f88ef107a28=>LineInfo(\"???\",\"???\",-284132824,true),0x00007f88ee89271a=>LineInfo(\"???\",\"???\",-293001446,true),0x00007f88e13a5cc7=>LineInfo(\"???\",\"???\",-516268857,true),0x00007f88e13b191a=>LineInfo(\"???\",\"???\",-516220646,true),0x00007f88ee88af7d=>LineInfo(\"???\",\"???\",-293032067,true),0x00007f88e84353a7=>LineInfo(\"checkbounds\",\"abstractarray.jl\",94,false),0x00007f88ee89f49b=>LineInfo(\"???\",\"???\",-292948837,true),0x00007f88ee89fcf7=>LineInfo(\"???\",\"???\",-292946697,true),0x00007f88eebe4b27=>LineInfo(\"???\",\"???\",-289518809,true),0x00007f88e8434f11=>LineInfo(\"getindex\",\"multidimensional.jl\",50,false),0x00007f88e843b444=>LineInfo(\"cartesianmap\",\"abstractarray.jl\",1155,false),0x00007f88ee8390f9=>LineInfo(\"???\",\"???\",-293367559,true),0x00007f88ee8390d4=>LineInfo(\"???\",\"???\",-293367596,true),0x00007f88e8435389=>LineInfo(\"checkbounds\",\"abstractarray.jl\",94,false),0x00007f88ee83c5ea=>LineInfo(\"???\",\"???\",-293354006,true),0x00007f88ee8a084c=>LineInfo(\"???\",\"???\",-292943796,true),0x00007f88ee89f334=>LineInfo(\"???\",\"???\",-292949196,true),0x00007f88e84301e5=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1265,false),0x00007f88e8435099=>LineInfo(\"_getindex!\",\"multidimensional.jl\",292,false),0x00007f88e8430309=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1277,false),0x00007f88ee89f7cf=>LineInfo(\"???\",\"???\",-292948017,true),0x00007f88e13a5cb4=>LineInfo(\"???\",\"???\",-516268876,true),0x00007f88ee834ae8=>LineInfo(\"???\",\"???\",-293385496,true),0x00007f88ee83907b=>LineInfo(\"???\",\"???\",-293367685,true),0x00007f88ee84bf24=>LineInfo(\"???\",\"???\",-293290204,true),0x00007f88e149da48=>LineInfo(\"???\",\"???\",-515253688,true),0x00007f88ef10daef=>LineInfo(\"???\",\"???\",-284108049,true),0x00007f88ee89fe00=>LineInfo(\"???\",\"???\",-292946432,true),0x00007f88ee89f48e=>LineInfo(\"???\",\"???\",-292948850,true),0x00007f88e8438aa1=>LineInfo(\"???\",\"???\",-398226783,true),0x00007f88ee8466e1=>LineInfo(\"???\",\"???\",-293312799,true),0x00007f88e843019d=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1265,false),0x00007f88e843a892=>LineInfo(\"sort!\",\"sort.jl\",247,false),0x00007f88e842f400=>LineInfo(\"trailingsize\",\"abstractarray.jl\",55,false),0x00007f88e7d40604=>LineInfo(\"???\",\"???\",-405535228,true),0x00007f88e8438adc=>LineInfo(\"???\",\"???\",-398226724,true),0x00007f88ee83908a=>LineInfo(\"???\",\"???\",-293367670,true),0x00007f88e842fd90=>LineInfo(\"???\",\"???\",-398262896,true),0x00007f88e149d945=>LineInfo(\"???\",\"???\",-515253947,true),0x00007f88ee842acb=>LineInfo(\"???\",\"???\",-293328181,true),0x00007f88e843a31c=>LineInfo(\"sort\",\"sort.jl\",321,false),0x00007f88ee89f2bf=>LineInfo(\"???\",\"???\",-292949313,true),0x00007f88e1485f08=>LineInfo(\"???\",\"???\",-515350776,true),0x00007f88e843859e=>LineInfo(\"anonymous\",\"abstractarray.jl\",1249,false),0x00007f88ee89acd8=>LineInfo(\"???\",\"???\",-292967208,true),0x00007f88e843b6c3=>LineInfo(\"anonymous\",\"abstractarray.jl\",1252,false),0x00007f88ee89f791=>LineInfo(\"???\",\"???\",-292948079,true),0x00007f88ee842bb5=>LineInfo(\"???\",\"???\",-293327947,true),0x00007f88ee839048=>LineInfo(\"???\",\"???\",-293367736,true),0x00007f88ee83c5bd=>LineInfo(\"???\",\"???\",-293354051,true),0x00007f88ee847390=>LineInfo(\"???\",\"???\",-293309552,true),0x00007f88ee8390dc=>LineInfo(\"???\",\"???\",-293367588,true),0x00007f88ee84c546=>LineInfo(\"???\",\"???\",-293288634,true),0x00007f88ee842be5=>LineInfo(\"???\",\"???\",-293327899,true),0x00007f88ee89f40a=>LineInfo(\"???\",\"???\",-292948982,true),0x00007f88ee8391ab=>LineInfo(\"???\",\"???\",-293367381,true),0x00007f88e42ffd30=>LineInfo(\"???\",\"???\",-466617040,true),0x00007f88e13b193d=>LineInfo(\"???\",\"???\",-516220611,true),0x00007f88e843a920=>LineInfo(\"sort!\",\"sort.jl\",234,false),0x00007f88e843a4bb=>LineInfo(\"???\",\"???\",-398220101,true),0x00007f88e84384b4=>LineInfo(\"cartesianmap\",\"abstractarray.jl\",1162,false),0x00007f88ee89f3fd=>LineInfo(\"???\",\"???\",-292948995,true),0x00007f88ee842c6b=>LineInfo(\"???\",\"???\",-293327765,true),0x00007f88ee8397d0=>LineInfo(\"???\",\"???\",-293365808,true),0x00007f88ee89f073=>LineInfo(\"???\",\"???\",-292949901,true),0x00007f88ee89a376=>LineInfo(\"???\",\"???\",-292969610,true),0x00007f88ee89f2e6=>LineInfo(\"???\",\"???\",-292949274,true),0x00007f88e8434f78=>LineInfo(\"getindex\",\"multidimensional.jl\",50,false),0x00007f88ee84bf42=>LineInfo(\"???\",\"???\",-293290174,true),0x00007f88ee892729=>LineInfo(\"???\",\"???\",-293001431,true),0x00007f88ee84c520=>LineInfo(\"???\",\"???\",-293288672,true),0x00007f88ee84a8c3=>LineInfo(\"???\",\"???\",-293295933,true),0x00007f88ee89f501=>LineInfo(\"???\",\"???\",-292948735,true),0x00007f88e8439f5e=>LineInfo(\"???\",\"???\",-398221474,true),0x00007f88ee836218=>LineInfo(\"???\",\"???\",-293379560,true),0x00007f88ee842b9a=>LineInfo(\"???\",\"???\",-293327974,true),0x00007f88ee89fb2e=>LineInfo(\"???\",\"???\",-292947154,true),0x00007f88ee842bae=>LineInfo(\"???\",\"???\",-293327954,true),0x00007f88ee89f493=>LineInfo(\"???\",\"???\",-292948845,true),0x00007f88ee89ffc1=>LineInfo(\"???\",\"???\",-292945983,true),0x00007f88e842b9cb=>LineInfo(\"profile_test\",\"In[2]\",5,false),0x00007f88e8430206=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1266,false),0x00007f88e8430672=>LineInfo(\"Plan\",\"fftw.jl\",301,false),0x00007f88ee89fec3=>LineInfo(\"???\",\"???\",-292946237,true),0x00007f88ee842d60=>LineInfo(\"???\",\"???\",-293327520,true),0x00007f88ef10dba0=>LineInfo(\"???\",\"???\",-284107872,true),0x00007f88e148f778=>LineInfo(\"???\",\"???\",-515311752,true),0x00007f88ee89f47a=>LineInfo(\"???\",\"???\",-292948870,true),0x00007f88ee8390f0=>LineInfo(\"???\",\"???\",-293367568,true),0x00007f88ee846724=>LineInfo(\"???\",\"???\",-293312732,true),0x00007f88e13a5cb0=>LineInfo(\"???\",\"???\",-516268880,true),0x00007f88e8435be5=>LineInfo(\"vcat\",\"abstractarray.jl\",655,false),0x00007f88ee83c5b6=>LineInfo(\"???\",\"???\",-293354058,true),0x00007f88ee8390f5=>LineInfo(\"???\",\"???\",-293367563,true),0x00007f88e842fb45=>LineInfo(\"anonymous\",\"abstractarray.jl\",319,false),0x00007f88e843a911=>LineInfo(\"sort!\",\"sort.jl\",233,false),0x00007f88ee842b8e=>LineInfo(\"???\",\"???\",-293327986,true),0x00007f88ee8765a5=>LineInfo(\"???\",\"???\",-293116507,true),0x00007f88e843d5c4=>LineInfo(\"anonymous\",\"profile.jl\",14,false),0x00007f88e842f95a=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",600,false),0x00007f88ee8328b8=>LineInfo(\"???\",\"???\",-293394248,true),0x00007f88ee842c73=>LineInfo(\"???\",\"???\",-293327757,true),0x00007f88ee89f50b=>LineInfo(\"???\",\"???\",-292948725,true),0x00007f88e843b3bf=>LineInfo(\"???\",\"???\",-398216257,true),0x00007f88ee8a0a13=>LineInfo(\"???\",\"???\",-292943341,true),0x00007f88ee84a8ce=>LineInfo(\"???\",\"???\",-293295922,true),0x00007f88e14bf9dc=>LineInfo(\"???\",\"???\",-515114532,true),0x00007f88e8431a26=>LineInfo(\"unique\",\"set.jl\",103,false),0x00007f88ee89f414=>LineInfo(\"???\",\"???\",-292948972,true),0x00007f88ee8a086e=>LineInfo(\"???\",\"???\",-292943762,true),0x00007f88ee842bf8=>LineInfo(\"???\",\"???\",-293327880,true),0x00007f88ee8466e0=>LineInfo(\"???\",\"???\",-293312800,true),0x00007f88e8439683=>LineInfo(\"mapslices\",\"abstractarray.jl\",1245,false),0x00007f88e843a68e=>LineInfo(\"sort!\",\"sort.jl\",247,false),0x00007f88e1485f00=>LineInfo(\"???\",\"???\",-515350784,true),0x00007f88e84386fe=>LineInfo(\"anonymous\",\"abstractarray.jl\",1252,false),0x00007f88e842ba2d=>LineInfo(\"profile_test\",\"In[2]\",6,false),0x00007f88ee842bc6=>LineInfo(\"???\",\"???\",-293327930,true),0x00007f88ee89f989=>LineInfo(\"???\",\"???\",-292947575,true),0x00007f88ee89fe03=>LineInfo(\"???\",\"???\",-292946429,true),0x00007f88e843a653=>LineInfo(\"fpsort!\",\"sort.jl\",424,false),0x00007f88ef10dcde=>LineInfo(\"???\",\"???\",-284107554,true),0x00007f88ef10dedc=>LineInfo(\"???\",\"???\",-284107044,true),0x00007f88ee842c0e=>LineInfo(\"???\",\"???\",-293327858,true),0x00007f88ee842ba0=>LineInfo(\"???\",\"???\",-293327968,true),0x00007f88ee892e0a=>LineInfo(\"???\",\"???\",-292999670,true),0x00007f88e8430328=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1268,false),0x00007f88ee84a8f9=>LineInfo(\"???\",\"???\",-293295879,true),0x00007f88e13af06d=>LineInfo(\"???\",\"???\",-516231059,true),0x00007f88ee842b65=>LineInfo(\"???\",\"???\",-293328027,true),0x00007f88ee8390aa=>LineInfo(\"???\",\"???\",-293367638,true),0x00007f88ee8a0a12=>LineInfo(\"???\",\"???\",-292943342,true),0x00007f88ee8390c6=>LineInfo(\"???\",\"???\",-293367610,true),0x00007f88e14bf796=>LineInfo(\"???\",\"???\",-515115114,true),0x00007f88ee89123c=>LineInfo(\"???\",\"???\",-293006788,true),0x00007f88e843a85e=>LineInfo(\"sort!\",\"sort.jl\",269,false),0x00007f88e13b1825=>LineInfo(\"???\",\"???\",-516220891,true),0x00007f88ee8390ba=>LineInfo(\"???\",\"???\",-293367622,true),0x00007f88ee8391b0=>LineInfo(\"???\",\"???\",-293367376,true),0x00007f88eed3ecab=>LineInfo(\"???\",\"???\",-288101205,true),0x00007f88ee842d95=>LineInfo(\"???\",\"???\",-293327467,true),0x00007f88ee842b80=>LineInfo(\"???\",\"???\",-293328000,true),0x00007f88ee842c20=>LineInfo(\"???\",\"???\",-293327840,true),0x00007f88e8438743=>LineInfo(\"anonymous\",\"abstractarray.jl\",1252,false),0x00007f88e14bf969=>LineInfo(\"???\",\"???\",-515114647,true),0x00007f88e1485f29=>LineInfo(\"???\",\"???\",-515350743,true),0x00007f88ee842bfb=>LineInfo(\"???\",\"???\",-293327877,true),0x00007f88e8431b38=>LineInfo(\"setindex!\",\"dict.jl\",551,false),0x00007f88e842fb40=>LineInfo(\"anonymous\",\"abstractarray.jl\",319,false),0x00007f88e8434e0f=>LineInfo(\"???\",\"???\",-398242289,true),0x00007f88ee842d82=>LineInfo(\"???\",\"???\",-293327486,true),0x00007f88e13b1058=>LineInfo(\"???\",\"???\",-516222888,true),0x00007f88e842f92e=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",598,false),0x00007f88e84301e2=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1265,false),0x00007f88ee842b5d=>LineInfo(\"???\",\"???\",-293328035,true),0x00007f88ee8391a7=>LineInfo(\"???\",\"???\",-293367385,true),0x00007f88e842f964=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",600,false),0x00007f88ee842d78=>LineInfo(\"???\",\"???\",-293327496,true),0x00007f88ee842ae8=>LineInfo(\"???\",\"???\",-293328152,true),0x00007f88e8438652=>LineInfo(\"anonymous\",\"abstractarray.jl\",1251,false),0x00007f88ee842b7b=>LineInfo(\"???\",\"???\",-293328005,true),0x00007f88ee842c00=>LineInfo(\"???\",\"???\",-293327872,true),0x00007f88e4300725=>LineInfo(\"???\",\"???\",-466614491,true),0x00007f88ee89fe15=>LineInfo(\"???\",\"???\",-292946411,true),0x00007f88e842fe00=>LineInfo(\"convert\",\"complex.jl\",22,false),0x00007f88ee83c5d2=>LineInfo(\"???\",\"???\",-293354030,true),0x00007f88eebe5241=>LineInfo(\"???\",\"???\",-289516991,true),0x00007f88e43005bf=>LineInfo(\"???\",\"???\",-466614849,true),0x00007f88ee8390d0=>LineInfo(\"???\",\"???\",-293367600,true),0x00007f88ee89f486=>LineInfo(\"???\",\"???\",-292948858,true),0x00007f88e14bf712=>LineInfo(\"???\",\"???\",-515115246,true),0x00007f88ee89f728=>LineInfo(\"???\",\"???\",-292948184,true),0x00007f88ee842bc3=>LineInfo(\"???\",\"???\",-293327933,true),0x00007f88ee8a0b33=>LineInfo(\"???\",\"???\",-292943053,true),0x00007f88eed3aa16=>LineInfo(\"???\",\"???\",-288118250,true),0x00007f88e43006ff=>LineInfo(\"???\",\"???\",-466614529,true),0x00007f88ee89ff25=>LineInfo(\"???\",\"???\",-292946139,true),0x00007f88ee8466ea=>LineInfo(\"???\",\"???\",-293312790,true),0x000000317880f710=>LineInfo(\"???\",\"???\",2021717776,true),0x00007f88ee8390d8=>LineInfo(\"???\",\"???\",-293367592,true),0x00007f88e1485e77=>LineInfo(\"???\",\"???\",-515350921,true),0x00007f88e8434ede=>LineInfo(\"getindex\",\"multidimensional.jl\",49,false),0x00007f88e842b97e=>LineInfo(\"profile_test\",\"In[2]\",5,false),0x00007f88ee842c9b=>LineInfo(\"???\",\"???\",-293327717,true),0x00007f88ee8390c1=>LineInfo(\"???\",\"???\",-293367615,true),0x00007f88ee89f4f9=>LineInfo(\"???\",\"???\",-292948743,true),0x00007f88e842f844=>LineInfo(\"randn!\",\"random.jl\",249,false),0x00007f88ee8a09b8=>LineInfo(\"???\",\"???\",-292943432,true),0x00007f88e84354cb=>LineInfo(\"???\",\"???\",-398240565,true),0x00007f88ee89f8d5=>LineInfo(\"???\",\"???\",-292947755,true),0x00007f88ee842bcf=>LineInfo(\"???\",\"???\",-293327921,true),0x00007f88e13b1737=>LineInfo(\"???\",\"???\",-516221129,true),0x00007f88e148fc50=>LineInfo(\"???\",\"???\",-515310512,true),0x00007f88e14bf787=>LineInfo(\"???\",\"???\",-515115129,true),0x00007f88e84301f8=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1266,false),0x00007f88e14bfa83=>LineInfo(\"???\",\"???\",-515114365,true),0x00007f88e14bf77f=>LineInfo(\"???\",\"???\",-515115137,true),0x00007f88e842f8d8=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",597,false),0x00007f88e8433632=>LineInfo(\"mapslices\",\"abstractarray.jl\",1245,false),0x00007f88ee8390c9=>LineInfo(\"???\",\"???\",-293367607,true),0x00007f88ee842b76=>LineInfo(\"???\",\"???\",-293328010,true),0x00007f88e84302f6=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1277,false),0x00007f88ee842bf1=>LineInfo(\"???\",\"???\",-293327887,true),0x00007f88e7dc4d21=>LineInfo(\"vcat\",\"./abstractarray.jl\",503,false),0x00007f88ee842ad7=>LineInfo(\"???\",\"???\",-293328169,true),0x00007f88e13a5cbe=>LineInfo(\"???\",\"???\",-516268866,true),0x00007f88ee84a8ed=>LineInfo(\"???\",\"???\",-293295891,true),0x00007f88e84301bc=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1265,false),0x00007f88ee83909a=>LineInfo(\"???\",\"???\",-293367654,true),0x00007f88eebe504f=>LineInfo(\"???\",\"???\",-289517489,true),0x00007f88ee846704=>LineInfo(\"???\",\"???\",-293312764,true),0x00007f88ee84a8b1=>LineInfo(\"???\",\"???\",-293295951,true),0x00007f88e8434f52=>LineInfo(\"getindex\",\"multidimensional.jl\",50,false),0x00007f88e8435085=>LineInfo(\"_getindex!\",\"multidimensional.jl\",37,false),0x00007f88e13b3986=>LineInfo(\"???\",\"???\",-516212346,true),0x00007f88ee84a8bc=>LineInfo(\"???\",\"???\",-293295940,true),0x00007f88e843032c=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1268,false),0x00007f88e842f92b=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",597,false),0x00007f88e842f926=>LineInfo(\"randmtzig_randn\",\"librandom.jl\",597,false),0x00007f88ef0a35d8=>LineInfo(\"???\",\"???\",-284543528,true),0x00007f88e8438731=>LineInfo(\"anonymous\",\"abstractarray.jl\",1252,false),0x00007f88e84383ed=>LineInfo(\"???\",\"???\",-398228499,true),0x00007f88e43005ad=>LineInfo(\"???\",\"???\",-466614867,true),0x00007f88ef107c3c=>LineInfo(\"???\",\"???\",-284132292,true),0x00007f88e842fba9=>LineInfo(\"anonymous\",\"abstractarray.jl\",319,false),0x00007f88ee84a1a9=>LineInfo(\"???\",\"???\",-293297751,true),0x00007f88ee842bef=>LineInfo(\"???\",\"???\",-293327889,true),0x00007f88ee842b8b=>LineInfo(\"???\",\"???\",-293327989,true),0x00007f88e843533c=>LineInfo(\"checkbounds\",\"abstractarray.jl\",92,false),0x00007f88e7cb67d0=>LineInfo(\"???\",\"???\",-406100016,true),0x00007f88ee89f82d=>LineInfo(\"???\",\"???\",-292947923,true),0x00007f88ee842bdc=>LineInfo(\"???\",\"???\",-293327908,true),0x00007f88e8430221=>LineInfo(\"promote_to!\",\"abstractarray.jl\",1267,false),0x00007f88e843645b=>LineInfo(\"cat\",\"abstractarray.jl\",622,false),0x00007f88ee84a8b8=>LineInfo(\"???\",\"???\",-293295944,true),0x00007f88ee89fe0d=>LineInfo(\"???\",\"???\",-292946419,true),0x00007f88e14bf9c5=>LineInfo(\"???\",\"???\",-515114555,true),0x00007f88ee8390a1=>LineInfo(\"???\",\"???\",-293367647,true),0x00007f88e842fba7=>LineInfo(\"anonymous\",\"abstractarray.jl\",319,false),0x00007f88ee892e5c=>LineInfo(\"???\",\"???\",-292999588,true),0x00007f88ee842b6c=>LineInfo(\"???\",\"???\",-293328020,true),0x00007f88ee8a0847=>LineInfo(\"???\",\"???\",-292943801,true),0x00007f88e842baca=>LineInfo(\"profile_test\",\"In[2]\",8,false),0x00007f88ee842bd9=>LineInfo(\"???\",\"???\",-293327911,true),0x00007f88ee84a8f1=>LineInfo(\"???\",\"???\",-293295887,true),0x00007f88e842f7ae=>LineInfo(\"mapreduce_impl\",\"reduce.jl\",271,false),0x00007f88ee88a2d0=>LineInfo(\"???\",\"???\",-293035312,true),0x00007f88ee8390cc=>LineInfo(\"???\",\"???\",-293367604,true),0x00007f88ee84aa00=>LineInfo(\"???\",\"???\",-293295616,true)],853x11 Array{TagData,2}:\n",
" TagData(0x0000000000000000,-1) \u2026 TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e842fe07,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) \u2026 TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" \u22ee \u22f1 \u22ee \n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) \u2026 TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x0000000000000000,-1)\n",
" TagData(0x00007f88e841fd37,0) TagData(0x00007f88e843a911,0) \n",
" TagData(0x00007f88e841fd37,0) \u2026 TagData(0x00007f88e843a920,0) \n",
" TagData(0x00007f88e841fd37,0) TagData(0x00007f88e843a68e,0) \n",
" TagData(0x00007f88e842f7ae,0) TagData(0x0000000000000000,-1),12)"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"@time profile_test(10)\n",
"@time profile_test(10)\n",
"@time profile_test(10)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"elapsed time: 0."
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"814026148 seconds (156743968 bytes allocated, 7.34% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.814009174 seconds (156730208 bytes allocated, 7.58% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.814474748 seconds (156730224 bytes allocated, 7.58% gc time)\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### abstractarray.jl lines 318-319\n",
"```\n",
"float(A::AbstractArray) = map_promote(x->convert(FloatingPoint,x), A)\n",
"complex(A::AbstractArray) = map_promote(x->convert(Complex,x), A)\n",
"```\n",
"These anonymous functions look like trouble!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Take some timings and compare to a version with named function"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# test array of Int64 to convert\n",
"ir = [i for i in 1:1000000];\n",
"fr = float(ir);\n",
"cr = complex(ir);"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"@which float(ir)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"float(A::<b>AbstractArray{T,N}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/353e64a0720118f6fdaba041af2d3bd7f27644ba/base/abstractarray.jl#L318\" target=\"_blank\">abstractarray.jl:318</a>"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 6,
"text": [
"float(A::AbstractArray{T,N}) at abstractarray.jl:318"
]
}
],
"prompt_number": 6
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"@time float(ir);\n",
"@time float(ir);\n",
"@time float(ir);\n",
"@time float(ir);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"elapsed time: 0."
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"360642214 seconds (39991952 bytes allocated, 5.11% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.365863059 seconds (39991968 bytes allocated, 6.51% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.365807984 seconds (39991952 bytes allocated, 6.51% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.366130502 seconds (39991952 bytes allocated, 6.52% gc time)\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### float(A::AbstractArray) with named function ~ 5.8x faster"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"function Base.float(A::AbstractArray) \n",
" cnv(x) = convert(FloatingPoint,x)\n",
" Base.map_promote(cnv, A)\n",
"end"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Warning: Method definition float(AbstractArray"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"{T,N},)"
]
},
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 8,
"text": [
"float (generic function with 11 methods)"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
" in module Base at abstractarray.jl:318 overwritten in module Main at In[8]:2.\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"@time float(ir);\n",
"@time float(ir);\n",
"@time float(ir);\n",
"@time float(ir);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"elapsed time: 0."
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"065522008 seconds (40043116 bytes allocated, 36.14% gc time)\n",
"elapsed time: 0.038304734 seconds (39992448 bytes allocated)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.062658875 seconds (39992448 bytes allocated, 38.22% gc time)\n",
"elapsed time: 0.06216872 seconds (39992464 bytes allocated, 38.69% gc time)\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### speed ratio"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"0.36/0.062"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 10,
"text": [
"5.806451612903226"
]
}
],
"prompt_number": 10
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### complex(A::AbstractArray) with named function ~ 6.25x faster"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"@which complex(ir)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"complex(A::<b>AbstractArray{T,N}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/353e64a0720118f6fdaba041af2d3bd7f27644ba/base/abstractarray.jl#L319\" target=\"_blank\">abstractarray.jl:319</a>"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 11,
"text": [
"complex(A::AbstractArray{T,N}) at abstractarray.jl:319"
]
}
],
"prompt_number": 11
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"@time complex(ir);\n",
"@time complex(ir);\n",
"@time complex(ir);\n",
"@time complex(ir);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"elapsed time: 0."
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"406808621 seconds (55991984 bytes allocated, 5.58% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.402890688 seconds (55991952 bytes allocated, 5.90% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.438426556 seconds (55991952 bytes allocated, 5.54% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.434572414 seconds (55991952 bytes allocated, 6.09% gc time)\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"function Base.complex(A::AbstractArray) \n",
" cnv(x) = convert(Complex,x)\n",
" Base.map_promote(cnv, A)\n",
"end"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Warning: Method definition complex(AbstractArray"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"{T,N},)"
]
},
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 13,
"text": [
"complex (generic function with 11 methods)"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
" in module Base at abstractarray.jl:319 overwritten in module Main at In[13]:2.\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"@time complex(ir);\n",
"@time complex(ir);\n",
"@time complex(ir);\n",
"@time complex(ir);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"elapsed time: 0."
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"06833231 seconds (56044220 bytes allocated, 36.35% gc time)\n",
"elapsed time: 0.064304898 seconds (55992448 bytes allocated, 37.81% gc time)\n",
"elapsed time: "
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.065242983 seconds (55992448 bytes allocated, 35.51% gc time)\n",
"elapsed time: 0.064157927 seconds (55992448 bytes allocated, 37.61% gc time)\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### speed ratio"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
".40/.064"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 15,
"text": [
"6.25"
]
}
],
"prompt_number": 15
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment