public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Panicz Maciej Godek <godek.maciek@gmail.com>, kawa <kawa@sourceware.org>
Subject: Re: Profiling Kawa code
Date: Fri, 6 Oct 2023 20:54:34 -0700	[thread overview]
Message-ID: <5715cd57-e600-60ff-957d-35c0016f9654@bothner.com> (raw)
In-Reply-To: <CAMFYt2YQ7tiBcBAMNDBJG7uA58kmuj9XnOtsu4Qthywcgv4gPg@mail.gmail.com>



On 10/6/23 18:18, Panicz Maciej Godek via Kawa wrote:
> it seems that reflection uses over 18% of total time, and I think it would
> be great if this overhead could somehow be removed
> (I don't think that the design of GRASP requires any reflection, so it's
> possible that I'm misusing Kawa in some ways)

I don't remember exactly when lang.reflect.Method.invoke is called.
One place is when you try to call a Java methid (perhaps with the
invoke procedure) but the compiler can't resolve it to a specific
method (or virtual method).

You need to figure out where in the generated bytecode Method.invoke
is called. You can use javap or some other bytecode de-compiiler
or dis-assembler. Once you narrow down wheer the call is coming
from you can add type specifiers to help the compiler.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2023-10-07  3:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAMFYt2Y3s-z-bW=2D06qxHc-CB55GXH_f5G89GbXCqUHCW-BOw@mail.gmail.com>
2023-10-07  1:18 ` Panicz Maciej Godek
2023-10-07  3:54   ` Per Bothner [this message]
2023-10-07  3:57     ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5715cd57-e600-60ff-957d-35c0016f9654@bothner.com \
    --to=per@bothner.com \
    --cc=godek.maciek@gmail.com \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).