GithubHelp home page GithubHelp logo

thomastay / expensive_modules Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 673 KB

A graph question solved efficiently in F#

Home Page: https://ttay.me/blog/optimizing_graph_algo_fsharp/

License: MIT License

C++ 11.02% F# 82.05% PowerShell 6.93%
fsharp-samples fsharp

expensive_modules's Introduction

Graph question solved in F#

See the accompanying blog post here, or in the repo at WRITEUP.md.

The code can be found in fsharp.Lib/

Building

To build this repo, you will need the .NET Core SDK 3.1. You can download it from the Microsoft website.

Once done, navigate to the directory holding this repo, and type dotnet build -c Release

The finished executable can be found in ./fsharp.Console/bin/Release/netcoreapp3.1/fsharp.Console.exe

Testing

There are very small unit tests in fsharp.Test/

Two bigger tests cases can be found in test_sparse.in and test_sparse_big.in (the latter is the test case from the blog post)

You can run the tests using bigChecks.ps1. It is a Powershell script, you will need to install Powershell Core to run it. (That said, it could easily be ported to bash if you wish)

C++

The C++ files in cpp/ are not optimized at all and should not be used for benchmarking. I wrote them to verify correctness of the F# program for big random input files.

expensive_modules's People

Contributors

thomastay avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.