Code Monkey home page Code Monkey logo

performance.jl's Introduction

Performance (part 1)

Build Status

This assignment has two goals:

  • it coaches you in good Julia practices, avoiding traps that can kill performance. By and large, this is an exercise in avoiding patterns that result in poor type inference, and in experimenting with tools that help you detect, diagnose, and resolve inference problems.
  • it introduces a few concepts from the analysis of algorithms, specifically the "big-O" notation and its use in evaluating implementations.

For this homework, start from the test/runtests.jl file, which mostly just includes a number of individual test files. Open them one-by-one and read the comments that describe the problems to be solved. These individual test files may contain one or more links, usually to sections of the Julia manual's Performance tips page. Read those pages/sections for background information that will help in solving this problem.

Solve the problems by modifying the file of the same name in src/, not by modifying the tests (unless explicitly instructed to so do). One exception to this rule is the ntests_finished at the top of runtests.jl: if you're bothered by failures of the tests you haven't yet fixed, just set this to the number of files whose tests you want to run. For example, to run just the tests in test/globals.jl, set ntests_finished = 1. If you do modify ntests_finished, make sure you put it back (or set ntests_finished = typemax(Int)) to ensure they all run before you declare victory with this assignment.

Some problems might say "See ?somefunction," which means you should read the help on somefunction.

Finally, a couple of notes about this repository:

  • when creating it, I deliberately left out the Documenter and Codecov plugins since neither is needed for this assignment.
  • I listed BenchmarkTools and Cthulhu as dependencies of this repository. This is for your convenience, but any real package shouldn't include "developer environment" dependencies. (One exception is if the package's actual code leverages and/or extends those packages.) Put them in your default environment instead, reserving the package environment for things actually needed by the package. Or, if the tests depend on one of them, list them in the [extras] section rather than the [deps] section of Project.toml.

performance.jl's People

Contributors

nwamsley1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.