<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dancygier.com&#187; Uncategorized</title>
	<atom:link href="http://www.dancygier.com/wordpress/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dancygier.com/wordpress</link>
	<description>home base for dancygier's everywhere ...</description>
	<lastBuildDate>Wed, 12 Jan 2022 02:45:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>MarkIt, an app to mark where you parked your car or to remember a special place.</title>
		<link>http://www.dancygier.com/wordpress/2015/01/22/markit-an-app-to-mark-where-you-parked-your-car-or-to-remember-a-special-place/</link>
		<comments>http://www.dancygier.com/wordpress/2015/01/22/markit-an-app-to-mark-where-you-parked-your-car-or-to-remember-a-special-place/#comments</comments>
		<pubDate>Thu, 22 Jan 2015 05:53:08 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dancygier.com/wordpress/?p=273</guid>
		<description><![CDATA[MarkIt http://www.markitapp.net is a tool to help you track where you parked your car or a great way to remember special places you&#8217;ve seen while traveling or just exploring neighborhoods in everyday life.   Use it to remember a bar, restaurant, museum, theater, park or whatever else you can think of. Setting a marker is [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>MarkIt <a href="http://www.markitapp.net " target="_blank">http://www.markitapp.net</a> is a tool to help you track where you parked your car or a great way to remember special places you&#8217;ve seen while traveling or just exploring neighborhoods in everyday life.   Use it to remember a bar, restaurant, museum, theater, park or whatever else you can think of.</p>
<p>Setting a marker is incredibly simple. Once you get your current location, just set your marker over the point on the map you want to mark and press the &#8220;Tap to Markit!&#8221; button.</p>
<p>In addition to simply saving an address we let you take up to 3 photos to store with your marker and we let you record notes about your marker. Sharing is easy. To share your marker along with images and notes just click the share icon in the action bar when viewing your marker. It will present you with a list of applications which will allow you to share your photos. A slide up panel with all your markers is available in the lower portion of the initial screen.</p>
<p>Finally navigation to your marker is available by clicking on the address when viewing your marker.</p>
<p>You can download it here <a href="https://play.google.com/store/apps/details?id=com.dancygier.android.markit">MarkIt</a></p>
<div style="float: left; padding-right: 5px;"><a href="https://play.google.com/store/apps/details?id=com.dancygier.android.markit" target="_blank"><br />
<img src="http://www.dancygier.com/wordpress/wp-content/uploads/2015/01/Screenshot_2015-01-21-02-38-071.png" alt="" width="240" height="400" /><br />
</a></div>
<div style="float: left; padding-right: 5px;"><a href="https://play.google.com/store/apps/details?id=com.dancygier.android.markit" target="_blank"><br />
<img src="http://www.dancygier.com/wordpress/wp-content/uploads/2015/01/Screenshot_2015-01-21-02-38-27.png" alt="" width="240" height="400" /><br />
</a></div>
<div style="float: left; padding-right: 5px;"><a href="https://play.google.com/store/apps/details?id=com.dancygier.android.markit" target="_blank"><br />
<img src="http://www.dancygier.com/wordpress/wp-content/uploads/2015/01/Screenshot_2015-01-21-02-38-45.png" alt="" width="240" height="400" /><br />
</a></div>
<div style="float: left; padding-right: 5px;"><a href="https://play.google.com/store/apps/details?id=com.dancygier.android.markit" target="_blank"><br />
<img src="http://www.dancygier.com/wordpress/wp-content/uploads/2015/01/Screenshot_2015-01-21-02-42-17.png" alt="" width="240" height="400" /><br />
</a></div>
<div style="float: left; padding-right: 5px;"><a href="https://play.google.com/store/apps/details?id=com.dancygier.android.markit" target="_blank"><br />
<img src="http://www.dancygier.com/wordpress/wp-content/uploads/2015/01/Screenshot_2015-01-21-02-39-31.png" alt="" width="240" height="400" /><br />
</a></div>
<div style="float: left; padding-right: 5px;"><a href="https://play.google.com/store/apps/details?id=com.dancygier.android.markit" target="_blank"><br />
<img src="http://www.dancygier.com/wordpress/wp-content/uploads/2015/01/Screenshot_2015-01-21-02-40-04.png" alt="" width="240" height="400" /><br />
</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dancygier.com/wordpress/2015/01/22/markit-an-app-to-mark-where-you-parked-your-car-or-to-remember-a-special-place/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cyanogen Mod 6 and mytouch 3g speed problems solved</title>
		<link>http://www.dancygier.com/wordpress/2011/07/30/cyanogen-mod-6-and-mytouch-3g-speed-problems-solved/</link>
		<comments>http://www.dancygier.com/wordpress/2011/07/30/cyanogen-mod-6-and-mytouch-3g-speed-problems-solved/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 23:49:57 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cell Phones]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dancygier.com/wordpress/?p=256</guid>
		<description><![CDATA[So I have my old mytouch 3g with cyanogenmod 6 as my gsm phone when I&#8217;m on vacation. The slowness is unbearable. It turns out the key to getting excellent performance is the following. Under cyanogenmod settings go to performance settings turn on JIT (Just in time compiler for the Dalvik VM) uncheck enable surface [...]]]></description>
			<content:encoded><![CDATA[<p>So I have my old mytouch 3g with cyanogenmod 6 as my gsm phone when I&#8217;m on vacation.  The slowness is unbearable.  It turns out the key to getting excellent performance is the following.</p>
<ul>
<li>Under cyanogenmod settings go to performance settings
<ul>
<li>turn on JIT (Just in time compiler for the Dalvik VM)</li>
<li>uncheck enable surface dithering</li>
<li>Check Lock home in memory</li>
</ul>
</li>
<li>Finally replace the default ADW Launcher with<a title="Launcher Pro for android" href="http://www.launcherpro.com/" target="_blank"> LauncherPro</a></li>
</ul>
<p>This last step, replacing the home launcher with Launcher Pro is what really did it for me.  Hope someone finds this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dancygier.com/wordpress/2011/07/30/cyanogen-mod-6-and-mytouch-3g-speed-problems-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NYC Health Ratings for Android</title>
		<link>http://www.dancygier.com/wordpress/2011/07/13/nyc-health-ratings-for-android/</link>
		<comments>http://www.dancygier.com/wordpress/2011/07/13/nyc-health-ratings-for-android/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 23:59:37 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cell Phones]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[New York City]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[restaurants]]></category>

		<guid isPermaLink="false">http://www.dancygier.com/wordpress/?p=231</guid>
		<description><![CDATA[I just released version 1 of nyc health ratings for android. You can search for restaurants by name and location and get detailed inspection results just as you can on nychealthratings.com.  Having this information available to you on a mobile device is so much more useful isn&#8217;t it.  One really nice feature is that searches [...]]]></description>
			<content:encoded><![CDATA[<div style="margin-left: auto; margin-right: auto;">
<div style="float: left; padding-right: 5px;"><a href="https://market.android.com/details?id=com.dancygier.android.nychealthratings" target="_blank"><img src="http://www.dancygier.com/wordpress/wp-content/uploads/2011/06/ss-0-1-502aeae86804091efc031eb2c543f5621114379c.jpeg" alt="NYC Health Ratings for Android" width="240" height="400" /></a></div>
<p><a href="https://market.android.com/details?id=com.dancygier.android.nychealthratings" target="_blank"></p>
<div style="float: left; padding-right: 5px;"><img src="http://www.dancygier.com/wordpress/wp-content/uploads/2011/06/ss-1-1-4803acfdd7815876fc4d37cfb1773b3543941d6d.jpeg" alt="" width="240" height="400" /></div>
<div style="float: left; padding-right: 5px;"><img src="http://www.dancygier.com/wordpress/wp-content/uploads/2011/06/ss-2-1-ad8efb62fb7887d11ee4875f7f8a7e52d393ebf6.jpeg" alt="" width="240" height="400" /></div>
<p></a><a href="https://market.android.com/details?id=com.dancygier.android.nychealthratings" target="_blank"></a></p>
<div style="clear: both; float: none;">I just released version 1 of <a href="https://market.android.com/details?id=com.dancygier.android.nychealthratings" target="_blank">nyc health ratings for android</a>.  You can search for restaurants by name and location and get detailed inspection results just as you can on <a href="http://www.nychealthratings.com" target="_blank">nychealthratings.com</a>.  Having this information available to you on a mobile device is so much more useful isn&#8217;t it.  One really nice feature is that searches default to your current network location, which works for the majority of searches.  If you are searching for a restaurant that isn&#8217;t in the immediate vicinity just input the zip code, address, or neighborhood name.  In addition to the android market it is also available on <a href="http://www.amazon.com/Aaron-Dancygier-NYC-Health-Ratings/dp/B005AM6QH4" target="_blank">amazons market</a>.</p>
<p>Now that I&#8217;ve finished version 1 for Android, I&#8217;m going to start building an iphone version.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dancygier.com/wordpress/2011/07/13/nyc-health-ratings-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Method::Signatures blazing fast and makes me sane</title>
		<link>http://www.dancygier.com/wordpress/2011/03/06/methodsignatures-blazing-fast-and-makes-me-sane/</link>
		<comments>http://www.dancygier.com/wordpress/2011/03/06/methodsignatures-blazing-fast-and-makes-me-sane/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 23:12:48 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dancygier.com/wordpress/?p=159</guid>
		<description><![CDATA[My biggest gripe about Perl has always been the lack of functional prototypes and method signatures.  The concept of method signatures is not a revolution it&#8217;s been around forever, almost every programming language I can think of off the top of my head has it in some form.  Having to unpack @_ time and time [...]]]></description>
			<content:encoded><![CDATA[<p>My biggest gripe about Perl has always been the lack of functional prototypes and method signatures.  The concept of method signatures is not a revolution it&#8217;s been around forever, almost every programming language I can think of off the top of my head has it in some form.  Having to unpack @_ time and time again is just such a waste of keystrokes.  Not only that there are multiple ways to do something so basic.  (Shift, copy the list to lexical vars, direct access in $_[i] etc).  It&#8217;s surely been the source of a number of bugs and something every Perl programmer needs to be conscious of.</p>
<p style="text-align: left;">My main argument for method signatures is it reduces bugs and it documents your code without having to write documentation.  Its declarative, it does what it says and says what it does.  Plain and simple no guessing.  As most Perl programmers are aware Devel::Declare is a module that has added the ability to extend Perl 5 the language without source filters.  There are several really cool modules that have been developed on top of Devel::Declare.  MooseX::Declare and MooseX::Method::Signatures and Method::Signatures in particular.  The first MooseX::Method::Signatures, comes bundled as part of MooseX::Declare.   MooseX::Declare adds  declarative class and method keywords on top of Moose.  MooseX::Method::Signatures has it&#8217;s own type system and does optional run time type checking on arguments much like you would do with Params::Validate except with a declarative syntax.  It&#8217;s down right beautiful and makes you warm and fuzzy inside to use it, the down side is there is a huge performance penalty to use MooseX::Method::Signatures at run time.  Depending on what you are doing it might not matter much.</p>
<p style="text-align: left;">The module Method::Signatures gives you 95% of the sugar and 100 x performance over MooseX::Method::Signatures.  Type checking at run time is something that I usually don&#8217;t need (This is still Perl, I swear).  Positional and named parameters are both supported along with defaults and constraints.  On my latest project I&#8217;ve been using Moose along with Method::Signatures and I couldn&#8217;t be any happier.  Take a look at the performance benchmarks I&#8217;ve included comparing these two modules along with regular &#8216;sub&#8217; methods.</p>
<h4><span style="color: #000000;">MooseX::Declare bench code</span></h4>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">use</span> MooseX<span style="color: #339933;">::</span><span style="color: #006600;">Declare</span><span style="color: #339933;">;</span>
&nbsp;
class Foo <span style="color: #009900;">&#123;</span>
  has x <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span>
    is  <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'rw'</span><span style="color: #339933;">,</span>
    isa <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'Str'</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  has <span style="color: #000066;">y</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span>
    is <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'ro'</span><span style="color: #339933;">,</span>
    isa <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'Str'</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># I use the three vars below to ensure that the subs</span>
  <span style="color: #666666; font-style: italic;"># are not constant-folded away.  Although I'm not sure perl will do that.</span>
  <span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$meth_counter</span>                 <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$meth_without_args_counter</span>    <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$meth_typed_counter</span>           <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$regular_sub_counter</span>          <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
  method method_with_type<span style="color: #009900;">&#40;</span> Int <span style="color: #0000ff;">$x</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000ff;">$meth_typed_counter</span><span style="color: #339933;">++;</span>
    <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x <span style="color: #339933;">.</span> <span style="color: #0000ff;">$x</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
  method method_without_type<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000ff;">$meth_counter</span><span style="color: #339933;">++;</span>
    <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x <span style="color: #339933;">.</span> <span style="color: #0000ff;">$x</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
  method method_without_args<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000ff;">$meth_without_args_counter</span><span style="color: #339933;">++;</span>
    <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">sub</span> regular_sub <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$self</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$x</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$regular_sub_counter</span><span style="color: #339933;">++;</span>
    <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x <span style="color: #339933;">.</span> <span style="color: #0000ff;">$x</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">package</span> main<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Benchmark <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">:</span>all<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$foo</span> <span style="color: #339933;">=</span> Foo<span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>new<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#123;</span> x <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">&quot;3&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066;">y</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">&quot;45&quot;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
cmpthese<span style="color: #009900;">&#40;</span>
  <span style="color: #cc66cc;">300000</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#123;</span>
    method_with_type    <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>method_with_type<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    method_without_type <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>method_without_type<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    method_without_args <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>method_without_args<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    regular_sub         <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>regular_sub<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4><span style="color: #000000;">MooseX::Declare Results</span></h4>
<pre>aaron@ ~/method_signature_bench $ perl MooseXTest.pl
                        Rate method_without_type method_with_type method_without_args regular_sub
method_without_type   5320/s                  --              -9%                -12%        -99%
method_with_type      5865/s                 10%               --                 -2%        -99%
method_without_args   6014/s                 13%               3%                  --        -99%
regular_sub         612245/s              11408%           10339%              10080%          --</pre>
<h4><span style="color: #000000;">Method::Signatures</span></h4>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000066;">package</span> Foo<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> Method<span style="color: #339933;">::</span><span style="color: #006600;">Signatures</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Moose<span style="color: #339933;">;</span>
&nbsp;
has x <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span>
 is  <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'rw'</span><span style="color: #339933;">,</span>
 isa <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'Str'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
has <span style="color: #000066;">y</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span>
 is <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'ro'</span><span style="color: #339933;">,</span>
 isa <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">'Str'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$meth_counter</span>                       <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$meth_without_args_counter</span>          <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$meth_typed_counter</span>                 <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$regular_sub_counter</span>                <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$regular_sub_without_args_counter</span>   <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
method method_without_type<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #0000ff;">$meth_counter</span><span style="color: #339933;">++;</span>
 <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x <span style="color: #339933;">.</span> <span style="color: #0000ff;">$x</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
method method_without_args<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #0000ff;">$meth_without_args_counter</span><span style="color: #339933;">++;</span>
 <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x <span style="color: #339933;">.</span> <span style="color: #ff0000;">'5'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> regular_sub <span style="color: #009900;">&#123;</span>
 <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$self</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$x</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
 <span style="color: #0000ff;">$regular_sub_counter</span><span style="color: #339933;">++;</span>
 <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x <span style="color: #339933;">.</span> <span style="color: #0000ff;">$x</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> regular_sub_without_args <span style="color: #009900;">&#123;</span>
 <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$self</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
 <span style="color: #0000ff;">$regular_sub_without_args_counter</span><span style="color: #339933;">++;</span>
 <span style="color: #0000ff;">$self</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>x <span style="color: #339933;">.</span> <span style="color: #ff0000;">'5'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">package</span> main<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> Benchmark <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">:</span>all<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$foo</span> <span style="color: #339933;">=</span> Foo<span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>new<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#123;</span> x <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">&quot;3&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066;">y</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #ff0000;">&quot;45&quot;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
cmpthese<span style="color: #009900;">&#40;</span>
 <span style="color: #cc66cc;">300000</span><span style="color: #339933;">,</span>
 <span style="color: #009900;">&#123;</span>
 method_without_type         <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>method_without_type<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
 method_without_args         <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>method_without_args<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
 regular_sub_without_args    <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>regular_sub_without_args<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
 regular_sub                 <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$foo</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>regular_sub<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></pre></div></div>

<h4><span style="color: #000000;">Method::Signatures Results</span></h4>
<pre>aaron@ ~/method_signature_bench $ perl MethodSignature.pl
 Rate regular_sub method_without_type regular_sub_without_args method_without_args
regular_sub              579710/s          --                 -7%                     -17%                -25%
method_without_type      625000/s          8%                  --                     -11%                -19%
regular_sub_without_args 701754/s         21%                 12%                       --                 -9%
method_without_args      769231/s         33%                 23%                      10%                  --</pre>
<h4><span style="color: #000000;">Analysis</span></h4>
<p>These tests are not exhaustive nor do they need to be.  Its clear that even with no arguments subs and Method::Signatures are on order of 100 times faster than MooseX::Method::Signatures.  What really surprised me here is that Method::Signatures looks to be faster than subs.  It would be an interesting test to benchmark the number and types of arguments.</p>
<p>Bottom line is I will use Method::Signatures and Moose in any new projects I write in Perl.  I&#8217;ve been successfully running production code with Method::Signatures since September with no problems.  Hoping to get some feed back on how Method::Signatures could possibly be faster than subs.</p>
<h5><span style="color: #000000;">Note</span></h5>
<ul>
<li>Benchmarks run on a Mac Book Pro with a 2.4ghz core i5 processor and 4b of ram</li>
<li>Modules tested
<ul>
<li><a href="http://search.cpan.org/~mschwern/Method-Signatures-20100730/lib/Method/Signatures.pm" target="_blank">Method::Signatures</a> version: 20100730</li>
<li><a href="http://search.cpan.org/~flora/MooseX-Method-Signatures-0.36/lib/MooseX/Method/Signatures.pm" target="_blank">MooseX::Method::Signatures</a> version: 0.36</li>
<li><a href="http://search.cpan.org/~flora/MooseX-Declare-0.34/lib/MooseX/Declare.pm" target="_blank">MooseX::Declare</a> version: 0.34</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dancygier.com/wordpress/2011/03/06/methodsignatures-blazing-fast-and-makes-me-sane/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ipod touch makes a great voip phone</title>
		<link>http://www.dancygier.com/wordpress/2009/10/10/ipod-touch-makes-a-great-voip-phone/</link>
		<comments>http://www.dancygier.com/wordpress/2009/10/10/ipod-touch-makes-a-great-voip-phone/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 20:23:29 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dancygier.com/wordpress/?p=155</guid>
		<description><![CDATA[Have spotty cell phone service at home?  Skype for iphone/ipod touch can turn your ipod touch into a full fledged voip/skype out phone.  Skype in and out with a full pledged number is only around 6 dollars a month.  Throw your landline away.  Sorry if this sounds like an ad!]]></description>
			<content:encoded><![CDATA[<p>Have spotty cell phone service at home?  Skype for iphone/ipod touch can turn your ipod touch into a full fledged voip/skype out phone.  Skype in and out with a full pledged number is only around 6 dollars a month.  Throw your landline away.  Sorry if this sounds like an ad!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dancygier.com/wordpress/2009/10/10/ipod-touch-makes-a-great-voip-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
