* view.c: Massive speed-ups by reordering statements and declaring
functions as inline.
Этот коммит содержится в:
родитель
d991a41c9f
Коммит
bb142400e1
@ -1,9 +1,7 @@
|
||||
2005-06-27 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* view.c (is_nroff_sequence): Reordered the statements to gain
|
||||
a speed-off of 30 percent on a 10 MB file.
|
||||
(coord_cache_entry_less): Another speed-up by declaring the
|
||||
function as inline.
|
||||
* view.c: Massive speed-ups by reordering statements and declaring
|
||||
functions as inline.
|
||||
|
||||
2005-06-22 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
|
@ -471,13 +471,13 @@ view_may_still_grow (WView *view)
|
||||
/* returns TRUE if the idx lies in the half-open interval
|
||||
* [offset; offset + size), FALSE otherwise.
|
||||
*/
|
||||
static gboolean
|
||||
static inline gboolean
|
||||
already_loaded (offset_type offset, offset_type idx, size_t size)
|
||||
{
|
||||
return (offset <= idx && idx - offset < size);
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
view_file_load_data (WView *view, offset_type byte_index)
|
||||
{
|
||||
offset_type blockoffset;
|
||||
@ -522,7 +522,7 @@ get_byte_none (WView *view, offset_type byte_index)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
static inline int
|
||||
get_byte_file (WView *view, offset_type byte_index)
|
||||
{
|
||||
assert (view->datasource == DS_FILE);
|
||||
@ -542,7 +542,7 @@ get_byte_string (WView *view, offset_type byte_index)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
static inline int
|
||||
get_byte (WView *view, offset_type offset)
|
||||
{
|
||||
switch (view->datasource) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user