Commit Graph

8 Commits

Author SHA1 Message Date
Marcel Hollerbach 2dcb18acac eina_array: micro optimize eina_array_push
This commit does two things:
- Tell the compiler that it is unlikely that we need to grow, and that
  it is unlikely that data is NULL. Sometimes the if check for data
  would get dropped out by the compiler when it can be ensured that it is
  != NULL. However, if we for example efl_add something and eina_push
  the result, the condition would not be removed, as there is no assertion
  efl_add would be != NULL.

- Do not hide the array assignment in a branch, but make it the default
  branch, this way instruction cache caches the correct instruction, as
  branch prediction will now hopefully, due to the hinting, take the
  correct branch.

While benchmarking this here (simply in elementary_perf), this reduced
pipeline faults in eina_array_push quite a bit. (Btw. it is hard to track
*which* exact calls to eina_array_push do cause that, as mostly this API
gets inlined, so it was easier optimizing that, instead of the method
arround)

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11997
2020-06-25 09:03:09 +02:00
Marcel Hollerbach 6c251b2d01 eina_array: interpret the count of a NULL array as 0
this makes the usage way more convinient.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11373
2020-02-19 16:28:08 +01:00
Vincent Torri e79d6bd0af eina_array: do not mix declaration and definition
fix warning when used in C90 code.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D10077
2019-09-23 16:43:54 +02:00
sub.mohanty@samsung.com 5bd95c9850 eina/array: added eina_array_find() api to eina_array.
Summary: updated test suite for testing the api.

Reviewers: zmike, Hermet, cedric, segfaultxavi

Reviewed By: zmike, segfaultxavi

Subscribers: segfaultxavi, ProhtMeyhet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9734
2019-08-26 08:31:08 -04:00
Carsten Haitzler 41c332b726 eina - redo a lot of the static inlines to have better instr cache usage
this moves a lot of logic that is rare away from the linear/flat asm
path of code so we et fewer l1 cache misses when executing chuncks of
our code. this also reduces the code size and takes some funcs like in
eina_inline_lock_posix.x and makes them real functions to reduce code
size thus better l1 cache usage - only for new/free of locks.
spinlocks, semaphores etc. as these will have no advantage being
inlined but simply bloat out code size instead.

overall this actually reduces efl lib binary sizes 0.4%, so that's a
good sign.

this passes make check and i think i got it right... let me know if i
didn't. i'm also not sure i should just keep the static inlines and
not make the formerly static inline funcs full EAPI ones now... good q.
2016-09-20 14:53:05 +09:00
Jeff Grimshaw cf5192025f efl/eina: General cleanup of Eina documentation
Summary:
I've combed through the Eina source files and made enhancements to the
documentation, including:
- Document the undocumented
- Fixed some errors in Doxygen markup
- Moved some function documentation from implementation (.c or .x) to definition
  (.h)
- Edited some of the entries to improve clarity

Test Plan: Reviewers

Reviewers: cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D639
2014-03-20 16:35:42 +09:00
Carsten Haitzler 69e27abdc3 eina - and e3fl in general - stop using eina_error_get/set - useless really 2013-10-11 16:50:40 +09:00
Carsten Haitzler 0a5ba96837 move eina headers into lib/eina like the rest of efl - at least be
consistent with the majority.



SVN revision: 77119
2012-09-27 04:02:37 +00:00