Page 1 of 1
Performace like ES2 or SourcePawn
Posted: Tue Dec 04, 2012 7:42 am
by mister-man
Hi,
I plan to port my ES2 scripts to SourcePython!
But the main question is, how is the performance? Like ES2 or better?
What is possible with SourcePython?
Thanks..
Posted: Tue Dec 04, 2012 11:08 am
by freddukes
Without doing performance stats myself, I would suspect a lot of things to be quicker than ES2. The main reason is that everything in C++ is essentially wrapped and exposed to Python, so there's almost a direct python call to the C++ calls; I'm not sure how real world examples stack up, but I would imagine most of the speed differences will be negligible between all 3 plugins.
The main benefit in my eyes of using Source Python over the others is the fact it implements the python libraries in a very "Pythonic" manor, and is just in general more consistent and superior to ES2 and SourcePawn. Source Python is still actively being developed by multiple people, which is another advantage over ES2. It's also open source, and thus can be contributed by a wider user base.
As it stands, Source Python will do most things ES2 can, but you may find things still to be implemented (which is in process). With how the plugin is designed, wrapping engine functionality is very quick and pretty painless with Boost.Python.
99% of the time, your major concern shouldn't be speed, and I would guess without seeing your scripts that they won't be doing a lot of processing. I would worry more about having an active development team, a better API / structure and the ease of writing / maintaining your scripts. Source Python IMO trumps the other 2 in these areas, but the obvious downside is we're still in our early stages, so it's still like a building site in here.
-freddukes
Posted: Tue Dec 04, 2012 2:04 pm
by mister-man
Okay, thanks freddukes!
But a second Question. Is there a IDE or a Notepad++ Highlighter for SP.
Posted: Tue Dec 04, 2012 3:05 pm
by satoon101
Since the plugin is still in development, and many things still need to be added to both the C++ side and Python side, it would be almost pointless to have a highlighter. For now, simply use the Python highlighter, as it should suffice. If someone wants to make a basic highlighter, we can try to keep it up to date as we implement more within our API.
Satoon
Posted: Tue Dec 04, 2012 3:07 pm
by Tuck
satoon101 wrote:Since the plugin is still in development, and many things still need to be added to both the C++ side and Python side, it would be almost pointless to have a highlighter. For now, simply use the Python highlighter, as it should suffice. If someone wants to make a basic highlighter, we can try to keep it up to date as we implement more within our API.
Satoon
could just use programmer's notepad "Project" feature
load the open source moduels into a project then create a .py it should come with hints etc for functions.
(never tried but concept should work)
Posted: Tue Dec 04, 2012 5:30 pm
by freddukes
I use Eclipse with the PyDev module. It has project code completion and doc-string help text etc. It's enough to read the libraries for the API.
-freddukes