Re: Improve SWIG layer performance. help.
William S Fulton <[email protected]> Thu, 31 Aug 2023 09:01:31 +0100
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <CANGqftCZxpFdnMktLKgWMcOz-kbDKbdurnHxd-XGT5JoPdCcjw@mail.gmail.com> |
The marshalling of types from Java to C++ has been written with performance in mind and is about as optimal as it can be for inter language use. The only thing you possibly could do is manage the memory manually (with all the downsides of this) instead of leaving it to the garbage collector as finalization can be a big overhead. The -O, -fastdispatch are scripting language options not relevant to the Java module. Any performance improvements will need to come from analysing and profiling your code and changes specific to your code will need to be made. William On Thu, 29 Jun 2023 at 06:55, Hrutwik Satkar <[email protected]> wrote: > Hi Swig Team, > Hope you are doing well. > > Currently I am working on a swig generated Java api whose native code is > in c++.Firstly we were using Swig version 2.0.10, but now we want some > improvement in performance of swig layer. For that we have upgraded the > swig version to 4.1.1 and used optimization flags like -O, -fastdispatch. > But by compiling with this flag also we didn't see any improvement in > performance. So could you please suggest some ways to improve the > performance? > > Please give some advice. > > Thanks in advance, > Hrutwik. > > _______________________________________________ > Swig-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/swig-user > _______________________________________________ Swig-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/swig-user