BVM question - Multiply context or remapping?

Blitz3D Forums/Blitz3D Programming/BVM question - Multiply context or remapping?

I'm trying to use BVM to let me do more with less(less hard coded stuff that is), and I'm not sure what use is proper with BVM? Should I simply remap my modules to the same context... or have a few contexts? Which is going to be most efficient? I assume the major drawback with more contexts would be memory consumption... if that's the case I would assume using more should be faster? Any help?

[Edit]Maybe I'm being dense and I don't need to worry about it? Do multiple modules "share" a context? Or do you have to one by one go through the modules and map them to the context? I'll be playing with it so I might answer it myself, but some input from someone with more experience would be cool!

thanks.

It depends on what your doing, but BVM is acctually very efficient when dealing with contexts, Both in speed and in memory.

A basic rule of thumb would be, if your reusing a script a lot in the game, create a static context and keep using it. as many as you need for each script. If its a script that is only going to be called once or a few times you can actually use helper function 'BVM_loadandInvoke()' and forget about managing the temporary context. its still very fast.

If you find yourself needing dozens (or more) of contexts simultainiously then its probably a design issue.
But whenever i have these types of questions about whats gonna give the best performance/managability in BVM I do some prototyping and benchmarking with a new project. Most of the time I find that bvm can handle thing very fast that I suspected would be slow.

What's BVM?

Blitz Virtual Machine.

You could try the Search functions.