Last active
October 3, 2017 22:24
-
-
Save paurkedal/a7e8c35f5791866b4cba4fdb2b8415da to your computer and use it in GitHub Desktop.
faster-map with new base implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" standalone="no"?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | |
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg | |
width="600" height="500" | |
viewBox="0 0 600 500" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
> | |
<title>Gnuplot</title> | |
<desc>Produced by GNUPLOT 5.0 patchlevel 5 </desc> | |
<g id="gnuplot_canvas"> | |
<rect x="0" y="0" width="600" height="500" fill="none"/> | |
<defs> | |
<circle id='gpDot' r='0.5' stroke-width='0.5'/> | |
<path id='gpPt0' stroke-width='0.190' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/> | |
<path id='gpPt1' stroke-width='0.190' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/> | |
<path id='gpPt2' stroke-width='0.190' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/> | |
<rect id='gpPt3' stroke-width='0.190' stroke='currentColor' x='-1' y='-1' width='2' height='2'/> | |
<rect id='gpPt4' stroke-width='0.190' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/> | |
<circle id='gpPt5' stroke-width='0.190' stroke='currentColor' cx='0' cy='0' r='1'/> | |
<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/> | |
<path id='gpPt7' stroke-width='0.190' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/> | |
<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/> | |
<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/> | |
<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/> | |
<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/> | |
<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/> | |
<path id='gpPt13' stroke-width='0.190' stroke='currentColor' d='M0,1.330 L1.265,0.411 L0.782,-1.067 L-0.782,-1.076 L-1.265,0.411 z'/> | |
<use xlink:href='#gpPt13' id='gpPt14' fill='currentColor' stroke='none'/> | |
<filter id='textbox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'> | |
<feFlood flood-color='white' flood-opacity='1' result='bgnd'/> | |
<feComposite in='SourceGraphic' in2='bgnd' operator='atop'/> | |
</filter> | |
<filter id='greybox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'> | |
<feFlood flood-color='lightgrey' flood-opacity='1' result='grey'/> | |
<feComposite in='SourceGraphic' in2='grey' operator='atop'/> | |
</filter> | |
</defs> | |
<g fill="none" color="white" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,432.8 M570.8,432.8 '/> <g transform="translate(74.3,437.4)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 0</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,383.5 M570.8,383.5 '/> <g transform="translate(74.3,388.1)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 20</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,334.2 M570.8,334.2 '/> <g transform="translate(74.3,338.8)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 40</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,284.9 M570.8,284.9 '/> <g transform="translate(74.3,289.5)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 60</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,235.6 M570.8,235.6 '/> <g transform="translate(74.3,240.2)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 80</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,186.3 M570.8,186.3 '/> <g transform="translate(74.3,190.9)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 100</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,137.0 M570.8,137.0 '/> <g transform="translate(74.3,141.6)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 120</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,87.7 M570.8,87.7 '/> <g transform="translate(74.3,92.3)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" > 140</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M84.0,432.8 M84.0,63.1 '/> <g transform="translate(84.0,458.4)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" > 10</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M181.4,432.8 M181.4,63.1 '/> <g transform="translate(181.4,458.4)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" > 100</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M278.7,432.8 M278.7,63.1 '/> <g transform="translate(278.7,458.4)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" > 1000</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M376.1,432.8 M376.1,63.1 '/> <g transform="translate(376.1,458.4)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" > 10000</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M473.4,432.8 M473.4,63.1 '/> <g transform="translate(473.4,458.4)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" > 100000</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='black' d='M570.8,432.8 M570.8,63.1 '/> <g transform="translate(570.8,458.4)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" > 1x10</tspan><tspan font-family="Helvetica" font-size="11.2" dy="-7.00px">6</tspan><tspan font-size="14.0" dy="7.00"></tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<g transform="translate(19.8,248.0) rotate(270)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" >Time relative to naive tail-recursive version (%)</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<g transform="translate(327.4,489.9)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" >List size (no. of elements)</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<g transform="translate(327.4,36.2)" stroke="none" fill="black" font-family="Helvetica" font-size="14.00" text-anchor="middle"> | |
<text><tspan font-family="Helvetica" >Time elapsed (relative) – lower is better</tspan></text> | |
</g> | |
</g> | |
<g id="gnuplot_plot_1" ><title>base</title> | |
<g fill="none" color="white" stroke="black" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<g transform="translate(82.3,416.9)" stroke="none" fill="black" font-family="Helvetica" font-size="13.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" >base</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='rgb( 0, 158, 115)' stroke-dasharray='7.5,12.0' d='M91.4,412.6 L138.3,412.6 M84.0,186.3 L106.4,186.3 L131.8,186.3 L156.8,186.3 L181.4,186.3 L205.5,186.3 | |
L230.0,186.3 L254.4,186.3 L278.7,186.3 L303.1,186.3 L327.4,186.3 L351.7,186.3 L376.1,186.3 L400.4,186.3 | |
L424.8,186.3 L449.1,186.3 L473.4,186.3 L497.8,186.3 L522.1,186.3 L546.5,186.3 L570.8,186.3 '/></g> | |
</g> | |
<g id="gnuplot_plot_2" ><title>stdlib</title> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<g transform="translate(220.2,416.9)" stroke="none" fill="black" font-family="Helvetica" font-size="13.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" >stdlib</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='gray' stroke-dasharray='3.0,6.0' d='M229.3,412.6 L276.2,412.6 M84.0,128.1 L106.4,77.6 L131.8,79.5 L156.8,86.1 L181.4,93.8 L205.5,71.9 | |
L230.0,85.0 L252.4,63.1 M255.8,63.1 L278.7,93.4 L303.1,81.0 L327.4,96.2 L351.7,128.0 L376.1,211.9 | |
L400.4,263.2 L424.8,289.5 L449.1,307.9 L473.4,299.5 L497.8,283.8 L522.1,261.9 L546.5,240.6 L570.8,189.1 | |
'/> <use xlink:href='#gpPt3' transform='translate(84.0,128.1) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(131.8,79.5) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(181.4,93.8) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(230.0,85.0) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(278.7,93.4) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(327.4,96.2) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(376.1,211.9) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(424.8,289.5) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(473.4,299.5) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(522.1,261.9) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(570.8,189.1) scale(5.25)' color='gray'/> | |
<use xlink:href='#gpPt3' transform='translate(252.7,412.6) scale(5.25)' color='gray'/> | |
</g> | |
</g> | |
<g id="gnuplot_plot_3" ><title>tupled-9</title> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<g transform="translate(358.1,416.9)" stroke="none" fill="black" font-family="Helvetica" font-size="13.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" >tupled-9</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='rgb(240, 228, 66)' d='M367.2,412.6 L414.1,412.6 M84.0,134.9 L106.4,68.6 L131.8,153.5 L156.8,171.6 L181.4,189.9 L205.5,179.9 | |
L230.0,195.6 L254.4,185.0 L278.7,189.7 L303.1,170.9 L327.4,171.9 L351.7,179.1 L376.1,229.8 L400.4,259.4 | |
L424.8,272.8 L449.1,285.4 L473.4,280.5 L497.8,267.4 L522.1,269.2 L546.5,272.1 L570.8,279.9 '/></g> | |
</g> | |
<g id="gnuplot_plot_4" ><title>base-new</title> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<g transform="translate(496.0,416.9)" stroke="none" fill="black" font-family="Helvetica" font-size="13.00" text-anchor="end"> | |
<text><tspan font-family="Helvetica" >base-new</tspan></text> | |
</g> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="3.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
<path stroke='rgb( 0, 158, 115)' d='M505.1,412.6 L552.0,412.6 M84.0,187.4 L106.4,179.1 L131.8,193.8 L156.8,186.5 L181.4,200.9 L205.5,187.0 | |
L230.0,190.9 L254.4,188.9 L278.7,201.1 L303.1,185.6 L327.4,187.6 L351.7,206.3 L376.1,253.1 L400.4,276.8 | |
L424.8,283.9 L449.1,287.6 L473.4,282.7 L497.8,269.1 L522.1,266.1 L546.5,270.1 L570.8,280.3 '/></g> | |
</g> | |
<g fill="none" color="white" stroke="rgb( 0, 158, 115)" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
</g> | |
<g fill="none" color="black" stroke="black" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
</g> | |
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter"> | |
</g> | |
</g> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment