royaltca
Pro
Posts: 33
Joined: Mon Mar 30, 2015 5:18 pm

What is better for performance?

Wed Apr 01, 2015 3:12 am

Quick question: what is the fastest / best?

SIML Code

<Model>
  		<Pattern>
  			<Item>Witaj</Item>
  			<Item>Witam</Item>
  			<Item>Witamy</Item>
  		</Pattern>
  		<Response>Something to say here.</Response>
</Model>
This?

SIML Code

<Model>
  		<Pattern>(Witaj|Witam|Witamy)</Pattern>
  		<Response>Something to say here.</Response>
</Model>
This?

SIML Code

<Model>
  		<Pattern>[Witaj]</Pattern>
  		<Response>Something to say here.</Response>
</Model>
Or this?

User avatar
Leslie
Lead Software Architect
Posts: 353
Joined: Fri Sep 14, 2012 12:20 pm
Contact: Website

Re: What is better for performance?

Wed Apr 01, 2015 5:02 am

The Stats shown in Chatbot Studio are slightly biased because Chatbot Studio forces the SIML interpreter to collect a lot of information while processing. This doesn't happen when you run the library in your own application.

Internally words are processed faster than any other token.

SIML Code

<Model>
  		<Pattern>
  			<Item>Witaj</Item>
  			<Item>Witam</Item>
  			<Item>Witamy</Item>
  		</Pattern>
  		<Response>Something to say here.</Response>
</Model>
but I recommend using SIML sets if you intend to match large number of individual words. ( Most of the time sets will perform equivalent to normal word matches )

SIML Code

<Model>
  		<Pattern>[Witaj]</Pattern>
  		<Response>Something to say here.</Response>
</Model>
and lastly usage of realtime sets is encouraged if you intend to match 2 or 3 invidiual/common words that aren't good enough to be saved as SIML sets.

SIML Code

<Model>
  		<Pattern>(Witaj|Witam|Witamy)</Pattern>
  		<Response>Something to say here.</Response>
</Model>
An updated version of Chatbot Studio will be released this Saturday. You will be able to visually see all the nodes/vertices and their edges processed during a Chat request which will give you an idea of your Bot performance.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest