BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//pretalx//programme.europython.eu//europython-2024//talk//MGMLPS
BEGIN:VTIMEZONE
TZID:Europe/Prague
BEGIN:DAYLIGHT
DTSTART:20230712T000000
TZNAME:CEST
TZOFFSETFROM:+0200
TZOFFSETTO:+0200
END:DAYLIGHT
BEGIN:STANDARD
DTSTART:20231029T030000
RDATE:20241027T030000
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20240331T030000
RDATE:20250330T030000
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
SUMMARY:How we used vectorization for 1000x Python speedups (no C or Spark
  needed!) - Justine Wezenaar\, Jonathan Hollenbeck
DTSTART;TZID=Europe/Prague:20240711T160500
DTEND;TZID=Europe/Prague:20240711T165000
DTSTAMP:20261112T095709Z
UID:pretalx-europython-2024-MGMLPS@programme.europython.eu
DESCRIPTION:Want to make all your code faster? With matrices\, library kno
 wledge\, and a sprinkle of creativity\, you can consistently speed up mult
 ivariate Python functions by 1000x!\n\nModal optimization requires simple 
 axioms - arithmetic\, checking a case\, calling the right sklearn function
 \, and so on. When that’s not sufficient\, three core tricks - convertin
 g conditional logic to set theory\, stacking vectors into a matrix\, and s
 haping data to match library expectations - cover the vast majority of rea
 l world cases (90% of the ~400 functions we vectorized). \n\nAt Bloomberg
 \, ESG (Environmental\, Social\, and Governance) Scores require complex co
 mputations on large data sets. Time-series computations are fundamental fo
 r Governance - one UDF infers board support for a policy from prior cyclic
 al votes and other time offset inputs. By rewriting the pandas backfill as
  a series of reductions on a 4-tensor\, we reduced the runtime from 45 min
 utes to 10 milliseconds! Analogously\, due to real world complexity\, fina
 nce UDFs can end up with 100+ if/else branches in one function. With a mix
  of De Morgan’s laws and sparse matrix representations\, we simplified t
 he cases and achieved 1000x+ speedups.\n\nWe’ll conclude with a quick ov
 erview of cutting-edge tools\, and hope you’ll leave with a concrete str
 ategy for vectorizing financial models!
LOCATION:Forum Hall
URL:https://programme.europython.eu/europython-2024/talk/MGMLPS/
END:VEVENT
END:VCALENDAR
