Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

ILE performance and code reuse

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • B.Morris
    replied
    ILE performance and code reuse

    BorisB wrote: > > I've asked this question on the c400 mailing list. I was wondering if I could get some more feadback here: > > There is an RPG ILE program that has certain functionality that I need in my C program. So I created an ILE module from the RPG program and statically bound it. Now the question is that the RPG program will be called probably millions of times during the program execution. Can I rely on the statically bound call performance or it would be wiser to implement the same functionality as a part of the C program? > Are you asking if call performance is faster when the called function is in the same module rather than in another module that is bound to the program? I don't think there is any difference. You could get a performance benefit from having the called function in the same C module is that the optimizer might be able to optimize it more, especially if you had inlining on. There _is_ a very slight difference in the performance of a function in a _service program_ (vs a function in a bound module), but even that is not worth worrying about, even if it's a million times. A million times a millionth of a second is only a second. (Just guessing at a millionth of a second, but I bet it's on that order.) You got some good advice on the mailing list about not setting on *INLR. If the RPG program goes through initialization every time it gets called, the call performance might suffer, depending on what initialization involves for that module. If it won't work correctly unless *INLR is set on each time, it might not be that easy to rewrite it in C. Before I wrote that RPG module in C, I'd make sure there really was a perceived performance problem.

    Leave a comment:


  • bbresc512
    started a topic ILE performance and code reuse

    ILE performance and code reuse

    I've asked this question on the c400 mailing list. I was wondering if I could get some more feadback here: There is an RPG ILE program that has certain functionality that I need in my C program. So I created an ILE module from the RPG program and statically bound it. Now the question is that the RPG program will be called probably millions of times during the program execution. Can I rely on the statically bound call performance or it would be wiser to implement the same functionality as a part of the C program? Thanks in advance
Working...
X