Giter Site home page Giter Site logo

Speedup possible? about org.neuroml.export HOT 2 OPEN

neuroml avatar neuroml commented on June 7, 2024
Speedup possible?

from org.neuroml.export.

Comments (2)

pgleeson avatar pgleeson commented on June 7, 2024

@lungd Bear in mind that what jNeuroML is doing there is spawning an external process (Neuron), running it and waiting until it completes. All of the simulation of the worm takes place in Neuron and this should be the bulk of the time of the whole process.

In some small networks it may be quicker to run the simulation in jNeuroML itself, it's inherently slower (and normally required a smaller dt, e.g. 0.01 ms) but you don't have the overhead of writing Neuron py/hoc/mod files, compiling the mod file and launching an external process.

One way or another you should experiment with adjusting the dt value, as this is the biggest factor in determining the run time of simulations. If you are running many simulations, you might get away with 0.1 ms in Neuron, but always check the behaviour against runs at 0.01 in nrn (or 0.001 in jnml natively) to make sure the overall behavour is captured.

from org.neuroml.export.

lungd avatar lungd commented on June 7, 2024

NeuronWriter creates a file with a content containing snippets with following structure:

f = open(...)
num_points = len(py_v_time)

for i in range(num_points):
    f.write(...)
f.close()

A possible improvement would be to create a string first and call write only once, e.g:

num_points = len(py_v_time)
file_string = ''.join(... for i in range(len(py_v_time)))
with open(...) as f:
    f.write(file_string)

from org.neuroml.export.

Related Issues (20)

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.