1. Euphoria 4.0 and diamond

Hello,

there is a small problem with the diamond library of Mike Nelson (found in the archiv) and Euphoria 4.0 rev 1387.

I moved the include files into the demo folder and changed in diamond.e the words entry to Entry. I also changed in animal.e the first include statement to: include diamond.e.

If I now run demo.ex or event.ex I get this error:

D:\Euphoria\diamond\Demo>exwc Demo.ex

Fatal run-time error:
third argument of find_from() is out of bounds (0)

The instruction at 0x004cff93 referenced memory at 0x00000004.
The memory could not be written.
Exception fielded by 0x004dd3a0 ...

Running demo.ex or event.ex with eu.ex will show this:

D:\Euphoria\diamond\Demo>exwc c:\EUPHORIA\SOURCE40\eu.ex demo.ex

c:\EUPHORIA\SOURCE40\fwdref.e:264 in procedure patch_forward_variable()
third argument of find_from() is out of bounds (0)

... called from c:\EUPHORIA\SOURCE40\fwdref.e:608 in procedure Resolve_forward_r eferences()

... called from c:\EUPHORIA\SOURCE40\main.e:261 in procedure main()

... called from c:\EUPHORIA\SOURCE40\main.e:276

> See ex.err

Press Enter...

I see that you have a lot of test programs for Euphoria 4.0. How do you build a test program for this case? What would be the best way to create a test program at all? Since some time there is a different behaviour in a special case with the use of type object (machine level exception error), but I do not know how to shorten the code in my application.

About benchmark with the diamond library:

speedtst.ex with exwc 3.1.1:

Enter the number of iterations (100-1000000): 100000

100000 iterations of Diamond set_property(): 0.110000
100000 iterations of Diamond get_property(): 0.090000
100000 iterations of Diamond call_method(): 0.250000
100000 iterations of Diamond constructor: 1.570000
100000 iterations of Diamond copy constructor: 0.260000
100000 iterations of Diamond destructor: 0.310000

Done. Press any key to exit.

speedtst.ex with exwc 4.0 (rev 1387)

Enter the number of iterations (100-1000000): 100000

100000 iterations of Diamond set_property(): 0.188000
100000 iterations of Diamond get_property(): 0.124000
100000 iterations of Diamond call_method(): 0.344000
100000 iterations of Diamond constructor: 2.340000
100000 iterations of Diamond copy constructor: 0.374000
100000 iterations of Diamond destructor: 0.374000

Done. Press any key to exit.

I did not yet try, but would speedtst.ex run faster if I would use public instead of global in the library?

Roland

new topic     » topic index » view message » categorize

2. Re: Euphoria 4.0 and diamond

RStowasser said...

there is a small problem with the diamond library of Mike Nelson (found in the archiv) and Euphoria 4.0 rev 1387.

Running demo.ex or event.ex with eu.ex will show this:

D:\Euphoria\diamond\Demo>exwc c:\EUPHORIA\SOURCE40\eu.ex demo.ex

c:\EUPHORIA\SOURCE40\fwdref.e:264 in procedure patch_forward_variable()
third argument of find_from() is out of bounds (0)

This looks like an issue with the way the forward reference was recorded.

RStowasser said...

I see that you have a lot of test programs for Euphoria 4.0. How do you build a test program for this case? What would be the best way to create a test program at all? Since some time there is a different behaviour in a special case with the use of type object (machine level exception error), but I do not know how to shorten the code in my application.

What I typically do it just to have some minimal program that reproduces the error, so that I can identify the root cause. Then I can write a test to capture this issue.

Usually, there is a unit test file that covers the area this deals with, but if not, I just create a new one. Basically, you have to include std/unittest.e, use the test_*() procedures, and put a test_report() at the end.

RStowasser said...

About benchmark with the diamond library:

I did not yet try, but would speedtst.ex run faster if I would use public instead of global in the library?

It should only affect the parsing time, but not the running time, which is what I assume is being measured here.

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu