tag:blogger.com,1999:blog-4199600433241885589.post3362891581726070073..comments2016-10-28T10:06:01.998+13:00Comments on Ziglio's Tech Blog: Java Construct 1.0.0 ReleaseEmanuele Zigliolihttp://www.blogger.com/profile/06779960218386244155noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-4199600433241885589.post-52032295852308930892012-08-05T23:40:57.860+12:002012-08-05T23:40:57.860+12:00I re-read your first message where you wrote that ...I re-read your first message where you wrote that Construct on PyPy actually runs slower than CPython. I'm really not the right person to answer Python questions. My limited experience running Python was with Pymite, an embedded VM. You may want to enter an issue here: https://github.com/construct/construct/issues and see what the experts say :-)Emanuele Zigliolihttps://www.blogger.com/profile/06779960218386244155noreply@blogger.comtag:blogger.com,1999:blog-4199600433241885589.post-57844078048278377532012-08-05T21:39:19.802+12:002012-08-05T21:39:19.802+12:00Wow, no, I've never done that profiling myself...Wow, no, I've never done that profiling myself but it sound a lot.<br />Were you running CPython? you could try PyPy, it should go faster.<br />But 40 seconds sounds like a lot. Or maybe 800ms is too fast, are you feeding a large number of packets?Emanuele Zigliolihttps://www.blogger.com/profile/06779960218386244155noreply@blogger.comtag:blogger.com,1999:blog-4199600433241885589.post-25899103654757409462012-08-05T03:58:16.557+12:002012-08-05T03:58:16.557+12:00finally got around to testing your Java Construct ...finally got around to testing your Java Construct for a simple ethernet sniffer file....don't know what i am doing wrong with the Python Construct definitions, but the "equivalent" definitions in Java parse about 50 times faster in about 800msec as opposed to 40sec. Would you expect such a performance improvement?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4199600433241885589.post-51794561957132912292012-07-02T23:02:10.968+12:002012-07-02T23:02:10.968+12:00The motivation for the Java port is that I program...The motivation for the Java port is that I program in Java (on the server) and there was nothing like Construct. I was sick and tired of designing parsers and encoders for custom binary protocols (have been doing that a dew times over the years).<br />I think the point of Construct is providing an easy way to do just that.<br />If your problem is generic serialization of objects, in Java there's no shortage, with the best being Kryo. See this comparison: https://github.com/eishay/jvm-serializers/wiki/Staging-Results<br /><br />Some libraries, such as Protocol Buffers, support C++ as well as Java and Python.Emanuele Zigliolihttps://www.blogger.com/profile/06779960218386244155noreply@blogger.comtag:blogger.com,1999:blog-4199600433241885589.post-54034018289358945292012-07-02T17:26:05.749+12:002012-07-02T17:26:05.749+12:00As always, if the batch job is large enough, execu...As always, if the batch job is large enough, execution time differences from static languages become apparent. Was this the motivation for the Java port?<br />I was guessing about pypy's static RPython work might be why my CPython run was faster, so i thought i would ask someone with real practical experience with the dynamic (eval, etc) and static versions. Hopefully any JVM dynamic optimizations can beat unoptimized C++ implementations.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4199600433241885589.post-15761892353015759442012-07-02T16:05:06.713+12:002012-07-02T16:05:06.713+12:00Hi Anon,
1. Interesting question. I haven't d...Hi Anon,<br /><br />1. Interesting question. I haven't done enough C++ to answer it but I've don't enough C to at least think about it. It'd be ironically closing full circle since the inspiration for Python Construct was C structs. It would be quite a bit of work but I'm sure people port stuff back on forth from C++ to Java. Not knowing enough of C++'s std library it's hard for me to estimate how long it would take to do it. Are you familiar with Python Construct and have you experienced performance issues?<br />2. You should ask that question to Tomer: http://tomerfiliba.com/blog/Construct-Plans/Emanuele Zigliolihttps://www.blogger.com/profile/06779960218386244155noreply@blogger.comtag:blogger.com,1999:blog-4199600433241885589.post-91353894645477599842012-07-02T15:15:01.721+12:002012-07-02T15:15:01.721+12:00any advice on whether your code can be easily port...any advice on whether your code can be easily ported to C++?<br />any insight on why the Python version runs even slower under pypy?Anonymousnoreply@blogger.com