Re: gtk_text_iter_forward_search() comparison
- From: cecashon aol com
- To: swilmet gnome org
- Cc: gtk-devel-list gnome org
- Subject: Re: gtk_text_iter_forward_search() comparison
- Date: Sun, 29 Jan 2017 16:36:39 -0500
Hi Sebastien,
I assume that you did not even look at the code before commenting. If code is more concise and runs faster... there is no interest? It uses UTF-8 functions but I don't have experience with other languages outside of English. I don't know how to test with other languages. Admittedly, I don't have all things figured out. Maybe there is a bug in the code. If there is no interest, that is OK with me. Not many people even look at search algorithms. I find it interesting.
Eric
-----Original Message-----
From: Sébastien Wilmet <swilmet gnome org>
To: cecashon <cecashon aol com>
Cc: gtk-devel-list <gtk-devel-list gnome org>
Sent: Sun, Jan 29, 2017 1:35 am
Subject: Re: gtk_text_iter_forward_search() comparison
On Sat, Jan 28, 2017 at 07:16:04PM -0500, Eric Cashon via gtk-devel-list wrote:
> I have been working on a little search experimentation. Gave writing a
> case in-sensitive gtk_text_iter_forward_search() a try. The code is
> shorter than what is in gtktextiter.c and it works a little faster. If
> a word is searched that isn't very frequent the time is about the
> same. If you just look for single chars or words that are frequent it
> looks to be quicker.
Is the performance of gtk_text_iter_forward_search() a problem for your
application? Or you just wanted to play a little with the code?
(Side note: GtkSourceView has a higher-level API for the search and
replace, with regex support. If you're working on the search and replace
for an application, this is worth a look.)
> Not sure if this a suitable method though. I know
> little of the textbuffer internals. UTF-8 gives me some trouble also.
This doesn't give us confidence in your code. Bug-free code is more
important than better performance at the cost of UTF-8-related bugs.
--
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]