[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64840] VM __vm_enable__ seems to have not neg
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #64840] VM __vm_enable__ seems to have not negligible overhead losses (~5%) in certain situations |
Date: |
Sun, 29 Oct 2023 23:31:44 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?64840>
Summary: VM __vm_enable__ seems to have not negligible
overhead losses (~5%) in certain situations
Group: GNU Octave
Submitter: None
Submitted: Mon 30 Oct 2023 03:31:42 AM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Performance
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 30 Oct 2023 03:31:42 AM UTC By: Anonymous
The performance of code executed using the VM and using vm_enabled flag = true
seems to cause (in certain situations) a non negligible overhead:
In the example below the VM is faster than the hierarchical interpreter, but
~5% slower compared to code which uses the VM (only) for the pre-compiled key
function and sets vm_enabled = false.
Whilst some overhead is expected and unavoidable, there seem to be room for
improvement with the noted 5% performance drop.
__vm_enable__(0);
clear test2; clear quadv;
tic;
for i=1:10000
y = test2(0, 2*pi);
endfor
toc;
__vm_enable__(1);
clear test2; clear quadv;
tic;
for i=1:10000
y = test2(0, 2*pi);
endfor
toc;
__vm_enable__(0);
clear test2; clear quadv;
__vm_compile__("quadv");
tic;
for i=1:10000
y = test2(0, 2*pi);
endfor
toc;
function ret = test2(a,b);
ret = quadv(@(x) sin(x), a, b);
endfunction
results in
Elapsed time is 5.68666 seconds.
Elapsed time is 3.71263 seconds.
Elapsed time is 3.50177 seconds.
>> 1-3.50177/3.71263
ans = 0.056795
Note: Interesting is that when in addition to quadv, test2 is also
pre-compiled and vm_enabled = false, the overall performance becomes (a little
~2%) slower compared to vm_enabled flag = true.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64840>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #64840] VM __vm_enable__ seems to have not negligible overhead losses (~5%) in certain situations,
anonymous <=