octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57321] Performance degradation due to memory


From: anonymous
Subject: [Octave-bug-tracker] [bug #57321] Performance degradation due to memory allocation
Date: Mon, 2 Dec 2019 16:18:40 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:60.9) Goanna/4.1 PaleMoon/28.2.0a1

Follow-up Comment #2, bug #57321 (project octave):

I have noticed that in addition to the interpreter thread there is at least
one thread, octave_gui, that accesses octave objects. So I made the memory
pool thread-safe by declaring it as "thread_local". In Linux systems it should
be compiled with option "-ftls-model=initial-exec" to achieve high performance
[1]. I also changed it to grow on demand.

There are nearly 40 types that inherit "octave_base_value". Each type has its
own memory manager. In octave_gui that has two threads there are totally about
80 memory managers (ntypes x nthreads). Each one is lightweight and grow on
demand and their size don't exceed 1000 elements. I expect 300% of performance
improvement.
I attached "ov-base3.h" and "ov-base3.h.diff"

[1] https://stackoverflow.com/a/40635676/6579744

(file #47968, file #47969)
    _______________________________________________________

Additional Item Attachment:

File name: ov-base3.h                     Size:26 KB
    <https://savannah.gnu.org/file/ov-base3.h?file_id=47968>

File name: ov-base3.h.diff                Size:2 KB
    <https://savannah.gnu.org/file/ov-base3.h.diff?file_id=47969>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57321>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]