Giter VIP home page Giter VIP logo

elasticcollisions.jl's Introduction

ElasticCollisions.jl

example of Elastic collision simulations using Agents and CellListMap

Without CellListMap.jl

julia> include("./Elastic.jl")

julia> only_steps(model = ball_model(nagents=500)); # compile

julia> @time only_steps(model = ball_model(nagents=2000));
  0.374590 seconds (3.32 M allocations: 279.059 MiB, 25.02% gc time)

julia> @time only_steps(model = ball_model(nagents=32000));
 15.027114 seconds (53.48 M allocations: 21.884 GiB, 32.97% gc time)

julia> @time only_steps(model = ball_model(nagents=128000));
402.776787 seconds (212.93 M allocations: 315.183 GiB, 78.49% gc time)

With CellListMap.jl

Benchmarks do not include compilation time.

julia> include("./Elastic_celllistmap.jl")

julia> only_steps(model = ball_model(nagents=500)); # compile

julia> @time only_steps(model = ball_model(nagents=2000));
  0.068423 seconds (776.01 k allocations: 50.143 MiB)

julia> @time only_steps(model = ball_model(nagents=32000));
  2.016708 seconds (12.88 M allocations: 770.866 MiB, 9.67% gc time)

julia> @time only_steps(model = ball_model(nagents=128000));
  8.988287 seconds (51.79 M allocations: 3.014 GiB, 11.81% gc time)

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.