From SKamkar at LucidX.com Thu May 30 01:18:54 2002 From: SKamkar at LucidX.com (Samy Kamkar) Date: Wed Aug 4 00:04:53 2004 Subject: OC-PM: LA.pm tutorial Message-ID: <3CF5C44E.2060008@LucidX.com> I hope some of you will be able to join us for this event! I should be in OC on Saturday, actually... OPTIMIZE YOUR PERL - A Tutorial Saturday June 1st 1:00pm - 5:00pm Presented by: Robert Spier Software Engineer Walt Disney Feature Animation Location: Ticketmaster Corporate Headquarters 3731 Wilshire Blvd, (Between Oxford & Serrano) Los Angeles, CA 90010 Synopsis: Learn how to optimize perl code to make it run faster, by choosing the right algorithms, data structures and code organization. This is not about speeding up Perl -- but speeding up the code you write Outline: This tutorial is an introduction to optimizing perl applications. It's important knowledge for anyone writing time-sensitive applications, from a CGI script to a large application. 1. A brief introduction to complexity theory Just enough complexity theory to have a basic language to talk about runtimes of functions. O(1), O(n), O(n2), etc. Complexity of common perl idioms like map, sort, nested loops, etc. Why is some code slow? (And it's not perl's fault!) 2. Real world / real code examples and how to make them faster Examples of O(n2) or worse functions and how they can be improved by an order of magnitude by rewriting the algorithm, and possibly changing the data structures used to store things. Memoization/Caching/Persistency/Precomputing. 3. Some simple Benchmarking Devel::DProf and Benchmark.pm can help to isolate problem spots in your code. Learn how to properly interpret data and how to pick the "important" pieces. 4. Is it worth it? Not all time spent optimizing the code is worth it. There are trade-offs of time, readability, speed. Discuss development strategies, pre-optimization, and over-optimization. O(n) can be faster than O(1) for small n. Why: I'll will be presenting this tutorial at The Perl Conference 6, part of O'Reilly's Open Source Convention, in San Diego at the end of July. (http://conferences.oreillynet.com/os2002.) If you were to attend the session, you'd pay about $320. But, you can come to my practice session for less than that, almost nothing, comparatively. I ask for two things in return. 1. Please provide me with honest feedback. I want to know what sucks about the tutorial, what you think might be better, and what parts you liked. 2. I may ask for a (voluntary) donation of $5 to cover expenses.[1] Special Thanks: I want to thank Ticketmaster, Todd Cranston-Cuebas, and Ask Bjorn Hansen for agreeing to host this talk. I know they had to pull a bunch of strings, but I'm sure it will be worth it. Security Considerations: Because this talk is hosted in a building designed for working, and not necessarily public traffic, Ticketmaster will be asking us to be mindful of some security requirements. For the safety of everyone involved, they will ask you to sign in, so that in the case of an emergency, they know who is in the building. To protect their intellectual property, there are portions of the building that will require an escort to pass through. Also, they will be asking you to sign a short document that says (paraphrased): "If you steal anything while you are here, we will sue you and press charges". I've looked over the document, and it is very reasonable and safe. Directions: Directions to Ticketmaster - Corporate Office 3731 Wilshire Blvd, (Between Oxford & Serrano) Los Angeles CA 90010 Telephone: 213.639.8883 http://makeashorterlink.com/?X1DA22CE From 10 Fwy W and 10 Fwy E, exit Western Ave; proceed North. Make a right onto Wilshire Blvd. Make a left onto Oxford. Make a right to the parking lot behind the building. From 110 Fwy N and 110 Fwy S, transition to the 10 Fwy W, exit Western; proceed North. Make a right onto Wilshire Blvd. Make a right to the parking lot behind the building. From 101 Fwy S, exit Western, and make a right. Turn left on Wilshire. Make an immediate left on Oxford. Make a right to the parking lot behind the building. From Hwy 2 S. Exit Glendale Blvd., turn left. Make a slight right on Alvarado St. Continue straight on Alvarado St. Turn right on Wilshire Blvd. Turn right on Serrano. Make a right to the parking lot behind the building. Parking: You can park in the parking lot behind the two towers. You can enter the outside lot from either Serrano or Oxford. Note that parking below the building (Valet parking) is closed on the weekends, so be sure to use the outside lot. We have arranged for a parking attendant to be there throughout the presentation. You will be requested to sign a parking sign-in sheet by the arrival. Please put "LA.pm" next to your name so that we will be properly billed for your parking. Proceed to the Western tower (3731) main lobby. There will be someone there to meet & greet you. Helpful Hints: * The Wilshire Colonnade Building has two white towers. 3731 is the Western-most tower with a Washington Mutual Bank branch located on the bottom floor. * Building is located on the North side of the street. * Sav-On Drug store and 24 Hour Fitness are nearby so you'll know you're in the right general area! Footnotes: [1] Potential expenses involve copying costs for outlines or handouts. Any remaining funds after expenses will be donated to either Yet Another Society (http://www.yetanother.org) or the German Shepherd Rescue of Los Angeles (http://www.gsrescue.org). Employees of the Walt Disney Company or Ticketmaster will not be asked to donate. (And I'm not sure if there will be expenses or not...) -- Samy Kamkar -- cp5 -- SKamkar@LucidX.com LucidX.com / LA.pm.org / code.LucidX.com