Skip to content

Efficient coding #206

@yiwen-h

Description

@yiwen-h
  • Timing code running and looking at the output
  • Common gotchas to speed things up
  • Loops vs vectorization vs functional programming
    • Sorry Tom, I don’t mean let’s use Haskell
    • sapply
    • purrr::map family and extensions
    • When loops are a good idea
  • If you have to use a loop, then do this (e.g. pre-allocate a vector)

Metadata

Metadata

Labels

C&C ☕Session idea for Coffee & Codingtechy

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions