mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Performance improvement hackathon: improve process comparison routines,
disable useless code in release builds such as runtime type-checking on dynamic data structures and process fields that are not being computed, faster(?) method for verifying the process owner (still need to ensure correctness), don't destroy and create process objects for hidden kernel threads over and over. Phew. I shouldn't be doing all this today, but I could not resist.
This commit is contained in:
9
Vector.h
9
Vector.h
@ -26,6 +26,7 @@ typedef void(*Vector_procedure)(void*);
|
||||
|
||||
typedef struct Vector_ {
|
||||
Object **array;
|
||||
Object_Compare compare;
|
||||
int arraySize;
|
||||
int growthRate;
|
||||
int items;
|
||||
@ -34,10 +35,14 @@ typedef struct Vector_ {
|
||||
} Vector;
|
||||
|
||||
|
||||
Vector* Vector_new(char* vectorType_, bool owner, int size);
|
||||
Vector* Vector_new(char* vectorType_, bool owner, int size, Object_Compare compare);
|
||||
|
||||
void Vector_delete(Vector* this);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#endif
|
||||
|
||||
void Vector_prune(Vector* this);
|
||||
|
||||
void Vector_sort(Vector* this);
|
||||
@ -62,7 +67,7 @@ void Vector_merge(Vector* this, Vector* v2);
|
||||
|
||||
void Vector_add(Vector* this, void* data_);
|
||||
|
||||
inline int Vector_indexOf(Vector* this, void* search_);
|
||||
inline int Vector_indexOf(Vector* this, void* search_, Object_Compare compare);
|
||||
|
||||
void Vector_foreach(Vector* this, Vector_procedure f);
|
||||
|
||||
|
Reference in New Issue
Block a user