tag:blogger.com,1999:blog-2309349868071255294.post8670780299627345626..comments2023-05-06T00:32:50.140-07:00Comments on Nothing Special: First Impressions with LV2 Plugin Development (almost a tutorial)Spencerhttp://www.blogger.com/profile/12246776537628500183noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2309349868071255294.post-15532225916846886892013-07-10T14:29:26.014-07:002013-07-10T14:29:26.014-07:00You are the second one to point this out to me, pe...You are the second one to point this out to me, perhaps I should look into it more. I wouldn't anticipate a large difference in performance between a switch and a if else if tree with a modern compiler. I wasn't aware that this happens in realtime though.<br /><br />Where it comes from is the best way for me to describe it. Its a mapping from some "place" (value) on the number line of integers. You are checking the type in the linear integer space rather than the any object space (if you think from a linear algebra standpoint). Perhaps I should get a better understanding and better analogy.<br /><br />Thanks for the comments.Spencerhttps://www.blogger.com/profile/12246776537628500183noreply@blogger.comtag:blogger.com,1999:blog-2309349868071255294.post-818019161606442832013-07-09T08:41:30.121-07:002013-07-09T08:41:30.121-07:00Note that connect_port() is a real-time function w...Note that connect_port() is a real-time function which many hosts will call once per port every cycle. Accordingly, it is a good idea to use a switch (rather than a big nest of conditionals) to make it as fast as possible.<br /><br />Re: "check where it comes from", I'm not sure what this means. You are still checking the type, it's just been mapped to an integer.Anonymoushttps://www.blogger.com/profile/01331206263864978871noreply@blogger.com