[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

no-defsubst (was Re: recentre anchor at top of window)



>>>>> In [emacs-w3m : No.10855] Katsumi Yamaoka wrote:
>>>>>> In [emacs-w3m : No.10853] Kevin Ryde wrote:
>> Katsumi Yamaoka <yamaoka@xxxxxxx> writes:
>>>
>>>  `w3m-view-this-url-1' is an inline function.

>> Incidentally, is that defsubst a leftover from when that function was
>> only used once, as more of w3m-view-this-url, or something?  If it's now
>> used in four places perhaps it shouldn't be inlined.

> Not only it, there are some other inline functions that don't
> seem to have to be inlined.  I think it's not worth inlining at
> least large ones like `w3m-toggle-inline-images-internal' and
> `w3m-view-this-url-1'.  They only fatten the elc file.
> Developers?

I've made the `no-defsubst' branch in the emacs-w3m CVS repository.
There most of inline functions have been changed into the ordinary
ones (i.e., using `defun', not `defsubst').  I think the overhead
of funcall is not dominant in time those functions take.  I'll try
using it for a while.  Developers who have an interest in it, you
can checkout that branch as follows:

$ cvs -d xxxxxxxx co -r no-defsubst emacs-w3m

P.S. I've made mistakenly the `no-defsubst-' branch.  Sorry.
Tsuchiya-san, could you please remove it?

Japanese:
`no-defsubst' という枝を作りました。ここではほとんどのインライン
関数を普通のものに変えてあります (つまり `defsubst' ではなくて
`defun' を使います)。関数呼出しのオーバーヘッドは、これらの関数
が費やす時間の中で支配的ではないと思うのですね。しばらく使ってみ
るつもりです。興味をお持ちの開発者の方は、上のやり方でチェックア
ウトできます。

追伸: 間違って `no-defsubst-' という枝を作ってしまいました。すみ
ませんが土屋さん、消していただけませんか?