Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 1.49 KB

README.md

File metadata and controls

22 lines (19 loc) · 1.49 KB

Session 3: Types, type inference and stability

Previous | Main | Next

OBJECTIVE: Demonstrate the dynamic programming features of Julia

  • KR1: Shown or demonstrated the hierarchy of Julia's type hierarchy using the command subtypes(). Start from Number and use subtypes() to explore from abstract types down to specific types. Use supertype() to determine the parent abstract type.
  • KR2: Implemented and used at least one own composite type via struct. Generate two more versions that are mutable type and type-parametrized of the custom-built type.
  • KR3: Demonstrated type inference in Julia. Generator expressions may be used for this.
  • KR4: Created a function with inherent type-instability. Create a version of the function with fixed type-instability issues.
  • KR5: Demonstration of how @code_warntype can be useful in detecting type-instability.
  • KR6: Demonstration of how Arrays containing ambiguous/abstract types often results to slow execution of codes. The BenchmarkTools may be useful in this part.

Resources

The basics of BenchmarkTools module package is found here.

Slides used

We used this slide set during the demo discussion.