Techila Shots
Technology, Software Architecture, Programming, Software Design, J2EE, Java, C++!
Friday, 2 July 2010
JNI/Win32:java.lang.UnsatisfiedLinkError
Friday, 28 May 2010
Clash of the Titans, C++ vs Java!
Recently, I spent some time to check on the performance (not a very detailed study) of the various programming languages. One, by researching on the internet; Two, by developing small programs and benchmarking. The legacy languages - be it ASM or C still rule in terms of performance. But these are definitely ruled out for enterprise applications due to the complexity in development, maintainability, need for object orientation and interoperability. They still will win for mission critical or real-time systems, which need performance over these parameters. There were languages i briefly read about, including other performance comparisons on the internet. These include Python, PHP, Perl and Ruby.
Considering all aspects and needs of current enterprise development, it is C++ and Java which outscore the other in terms of speed. According to other comparisons [Google for 'Performance of Programming Languages'] spread over the net, they clearly outshine others in all speed benchmarks. So much for my blog title :-)
So when these titans are pit against each other in real time, considering all aspects of memory and execution time - Java is floored. Though I have spent last 7 years of my life coding and perfecting my Java and J2EE skill - I suddenly feel... Ahem, Slow! One of the problem statements to verify this is given below (alongwith the associated code) and the associated execution parameters.
Input
The input will contain several test cases (not more than 10). Each testcase is a single line with a number n, 0 <= n <= 1 000 000 000. It is the number written on your coin.
JAVA SOLUTION
C++ SOLUTION
RESULTS
| TIME | MEM | LANG |
| 0.00 | 2.8M | C++ 4.3.2 |
| 0.26 | 218.3M | JAVA |
I am sure these results will continue to be remain in the same ratio (with slight variations for other or benchmark problems) - even with the most optimized java code.
Saturday, 31 January 2009
JAR Searcher Developer Tool
or you can directly invoke the program from the bundled JAR file:
java -jar jar-searcher.jar
Friday, 23 January 2009
Spring - DWR - Ext JS Chat Application

Chat Screen
Simply, drop the .war file in your web/app server. All dependencies are available in the archive itself. The only external reference is 'servlet-api.jar', which is part of the default lib in all latest containers. The source is packaged separately. Once deployed, the url to access should be: http://[server_name]
If you are trying to figure out what 'Kabootar' means, it's hindi for 'Pigeon'...
Friday, 16 January 2009
JBoss Cache XSD Config in Eclipse
http://www.springmodules.org/schema/cache/springmodules-jboss.xsd
>>>>> jar:file:pathto/spring-modules-cache.jar!/org/springmodules/cache/config/jboss/springmodules-jboss.xsd
>>>>> KEY TYPE Schema Location
>>>>> KEY http://www.springmodules.org/schema/cache/springmodules-jboss.xsd
Thursday, 15 January 2009
Spring, Hibernate, EhCache Recipe
PERFORMANCE COMPARISON (in seconds)
==================================
QUERY FETCH TIME (INITIAL): 0.599
QUERY FETCH TIME (HIBERNATE CACHE): 0.212
QUERY FETCH TIME (2ND LEVEL CACHE): 0.091
The main program to run the sample is SpringOrmIntegration.java