Performance and Multiple .dll Files

C

cppaddict

Hi,

I have a Java class with a number of native methods, many of them
somewhat complex in their implementation.

I was thinking about compiling the implementation of each native
method into its own .dll file, and then loading all of them inside the
Java class.

The other option is to create a single .dll.

1. Are there performance advantages of one method over the other?

2. Is one method considered better design than the other? What are
the design considerations?

3. Is one method generally considered the best practice?

Thanks for any thoughts,
cpp
 
R

Roedy Green

The other option is to create a single .dll.

1. Are there performance advantages of one method over the other?

2. Is one method considered better design than the other? What are
the design considerations?

3. Is one method generally considered the best practice?

The usual pattern is 1 DLL per class that has native methods.

The advantage of that pattern is you don't load a DLL unless you use
it.

It also makes code more reusable. You package just the DLLs you need.

Combining the DLLs means slightly faster load.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top