Go to Post The card system worked. Well. It was used properly and (except for when Paul yellow carded Andy during his "Thank you" speech) wasn't abused. I applaud the referees. Kudos. - Collin Fultz [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 25-10-2016, 08:20
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,373
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Optimization, when to stop

I'm a big Ether fan, most of his posts are set out to make the reader think. One of his posts got me thinking about software optimization.

Backstory: Stacy from FRC 1318 built a set interfaces to allow data from the FIRST API server to be pulled into the stat package/language R for processing. This would be a good thing for scouting teams, they could get data from FIRST and apply it to their match.

Later on, Ether wanted to get the World OPR calculations done. He had worked on it and wasn't successful, I gave it a shot, but I had approached the problem the wrong way and I wasn't successful.

Stacy came out with code that processed the WOPR in about 13 seconds. Pretty cool, this would allow WOPR discussions to take place during long breaks of matches and be discussed by color commentators.

I was impressed, both that Stacy had gotten it to work and that it ran in 13 seconds. Ether suggested that the time get cut in half and then in a later post by a factor of 10. Both which may be reasonable goals. But are they really?

When I've been asked in the past to do some optimization's I start looking at how many times the the transaction will run and by how many people.

XKCD has a good cartoon that covers this situation.



So lets look at the situation. We want to shave about 5 seconds off (cut time in half). If it's just Ether doing the WOPR run after Worlds, then we should spend about 25 seconds working on it. If we want to get it to about a second, we can work about a minute on it.

So clearly for the "just Ether case", it's not worth it.

But lets take the other extreme. After every match at every event we are going to calculate WOPR. Lets go with 70 events and about 70 matches per event 4900, lets call it 5000 matches.

Spreading them across 7 weeks and 7 days gives us about 100 times per day. Looking at the chart, saving 5 seconds gives us about 10 days of time we can spend on this. (If you were to spread them across a year, you would get 13 per day or the ability to spend 2 hours on the task).

A more likely case is wanting WOPR for District Champs / World Championships and events that bring big teams together like IRI and Cheesy Champs. Lets call it 12 events and 70 matches that gives us about 50 times a day we will do WOPR, so we can spend about 5 days on the optimization. (Likewise if you were to spread it across the year, you can spend about 20 minutes, you may have already blown most of that time reading this article. )

The above discussion assumes that you are doing the work and that you are doing the activity, you are "reaping" the time saved. In our case of WOPR everywhere / every match, unless you are Koko Ed, you are not going to all those events. So your efforts are paying into the system.

If you have 5 days to spend and if you think that WOPR calculations will become a thing to do thousands of times in a year, take up Ether's challenge to cut the time in 1/2.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi