Page 1 of 1

json and swi

Posted: 31 May 2017 20:17
by augustinharrison
we have a new team member from the AI dept of the University of Georgia. he has written a json doc
parser from swi prolog using DCG grammer. it was stated in this forum that grammar is somewhat of a window dressing and could be adapted fairly easily in vip.

having 30 years in visual prolog (all the way back to before borland bought it sold 200k copies and sold it back), i would like to keep it in place in my EKS which is now being considered for swi prolog. i can either finish my parser which he did in one day or possibly compile his parser and rest calls into vip.

i am attaching an update with questions from chris (the new member) which i want you to take a look at and give me your opinion on which option might work best. he did a comparison and states vip is around 8 times faster than swi which is my best argument for leaving the eks in vip.


thanks,

AEHJ

Posted: 31 May 2017 21:55
by Paul Cerkez
Years ago, back in the PDC 3.x days I remember doing a comparison between SWI and PDC Prolog (as it was called then).

PDC was noticeably faster in all my tests, event when used as the PIE. I can't vouch for the current versions of VIP v. SWI because I don't use SWI at all. (I am a little biased towards PDC/VIP after my first encounters.)

some of the reasons I came up with then:
PDC/VIP is 'Typed'
PDC/VIP is also (usually) compiled
SWI was only available as "interpreted" (all code parsed and executed at run time). However, even PIE shown itself to be faster on the same code/operations.

All tests were run on the same computer.

It will be interesting to see if anyone has current data. ;-)

P.

Posted: 1 Jun 2017 8:12
by Thomas Linder Puls
You should definitely use Visual Prolog ;-).

You new team member ask about already existing JSON support, so you should recall our conversation: json doc.