<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Justin Rogers : Performance, Personal</title><link>http://weblogs.asp.net/justin_rogers/archive/tags/Performance/Personal/default.aspx</link><description>Tags: Performance, Personal</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>BlogShares has changed their graphing, but is still using PHP...</title><link>http://weblogs.asp.net/justin_rogers/archive/2004/07/19/187859.aspx</link><pubDate>Mon, 19 Jul 2004 21:56:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:187859</guid><dc:creator>Justin Rogers</dc:creator><author>Justin Rogers</author><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/justin_rogers/rsscomments.aspx?PostID=187859</wfw:commentRss><comments>http://weblogs.asp.net/justin_rogers/archive/2004/07/19/187859.aspx#comments</comments><description>&lt;P&gt;BlogShares is a project that I'd love to tackle in switching over to an ASP .NET site. They are racked constantly with visitors, they have some fairly detailed view screens, they are constantly aggregating and changing data, and constantly pulling from a large listing of RSS feeds. Recently they've added some graphs that look better and they've been adding some new game rules and such. The site is a behemoth of possible performance improvements and features.&lt;/P&gt;
&lt;P&gt;Looking at their graphs, they probably haven't seen Dundas Charts or any of the really nice graph facilities available&amp;nbsp;to&amp;nbsp;.NET programmers. I hate to say it, but if our graphs went to the same school as their graphs, we'd definitely tease them in the lunch room. I'm thinking performance must be a really large goal for the charting, but I wouldn't foresee any problems making both high quality, high performance charts.&lt;/P&gt;
&lt;P&gt;Anyway, if you haven't checked out BlogShares, you shold go check it out. A kind of fantasy stock market in blogs. I've been a member for a while, but all I do is insider trade with my own blog as time permits.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=187859" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/justin_rogers/archive/tags/GDI_2B00_/default.aspx">GDI+</category><category domain="http://weblogs.asp.net/justin_rogers/archive/tags/Performance/default.aspx">Performance</category><category domain="http://weblogs.asp.net/justin_rogers/archive/tags/ASP+.NET/default.aspx">ASP .NET</category><category domain="http://weblogs.asp.net/justin_rogers/archive/tags/Personal/default.aspx">Personal</category></item><item><title>Final Notes on the Telephone Number -&gt; Words Programming Challenge.</title><link>http://weblogs.asp.net/justin_rogers/archive/2004/04/07/109197.aspx</link><pubDate>Wed, 07 Apr 2004 18:32:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:109197</guid><dc:creator>Justin Rogers</dc:creator><author>Justin Rogers</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/justin_rogers/rsscomments.aspx?PostID=109197</wfw:commentRss><comments>http://weblogs.asp.net/justin_rogers/archive/2004/04/07/109197.aspx#comments</comments><description>&lt;P&gt;I have to say that at first I couldn't fully enjoy this puzzle because of some time constraints.&amp;nbsp; However, looking at it now, and taking an extra two hours to refine the code, I'm having some fun.&amp;nbsp; I went ahead and made some really cool changes this morning which are fully documented at the top of the code.&amp;nbsp; Basically:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The algorithm I use is recursive.&amp;nbsp; This means that the same substrings may get passed back into the function multiple times.&amp;nbsp; In order to eliminate this feature I've added an intern table.&amp;nbsp; The results are that when running the program, if a specific substring has already been processed, it won't be processed again and the cached results will get returned.&amp;nbsp; This tripled the speed of the program.&lt;/LI&gt;
&lt;LI&gt;Since part of the algorithms 200 ms was loading the dictionary, I modified the input to allow you to process multiple numbers.&amp;nbsp; If we chose to use this algorithm commercially and cared about the performance, we'd really want to process large amounts of numbers at a time and the pre-cached dictionary would buy us quite a bit.&lt;/LI&gt;
&lt;LI&gt;Since multiple numbers share common substrings, the intern table now stores all of the results for those substrings.&amp;nbsp; So after processing say 10-20 numbers, the algorithm actually starts getting faster (while consuming a little bit of extra memory).&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Having a good look at the remaining code, the only additional optimization I can think of is getting rid of the large number of ArrayList objects and replacing them with something strongly typed.&amp;nbsp; That would probably speed the application up quite a bit.&amp;nbsp; There are a couple of smaller optimizations as well, that I would make if say this challenge added performance rules.&lt;/P&gt;
&lt;P&gt;Solutions currently available for the challenge: &lt;A id=viewpost.ascx_TitleUrl href="http://blogs.msdn.com/the1/articles/108702.aspx"&gt;Solutions to the Phraser programming challenge&lt;/A&gt;&lt;BR&gt;My latest and greatest solution: &lt;A id=CategoryEntryList.ascx_EntryStoryList_Entries__ctl0_TitleUrl HREF="/justin_rogers/articles/105916.aspx"&gt;&lt;FONT color=#0000ff&gt;Trying my hand at the old Phone number to Words teaser project!&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=109197" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/justin_rogers/archive/tags/Performance/default.aspx">Performance</category><category domain="http://weblogs.asp.net/justin_rogers/archive/tags/Algorithms/default.aspx">Algorithms</category><category domain="http://weblogs.asp.net/justin_rogers/archive/tags/Personal/default.aspx">Personal</category></item></channel></rss>