Hi,
I think you attached wrong file.  there is no changes the attachment.  So 
were you  able to run it under Native back-end?

This is what i found out, so running with compiled version of X10 (instead of 
pre-compiled version), this is what I got for output.  Native version is way 
longer than Java-backend, and java-version of AES is 21seconds for 18M file.  I 
expect Native version would run faster than Java-Backend
----------
odin000960361:Desktop anhtrinh$ x10 AES -e 2 PPSTUFF/zip18mb.zip
Unable to load x10rt_sockets. Forcing single place execution
Unable to load x10rt_sockets. Forcing single place execution
0
1
25629 milliseconds
Done ENC
odin000960361:Desktop anhtrinh$ ./AES_O_NC -e 2 PPSTUFF/zip18mb.zip
1
0
71156 milliseconds
GC Warning: Repeated allocation of very large block (appr. size 18862080):
May lead to memory leak and poor performance.
Done ENC
-------------------




Thanks
Anh


________________________________
From: David P Grove <gro...@us.ibm.com>
To: Anh <a...@pacbell.net>
Sent: Friday, November 4, 2011 11:14 AM
Subject: Re: [X10-users] AES in X10


A somewhat obscure problem, but a bug in your code.

In the run method you had

if( this.op == "ENC" ){
this.output =  this.encrypt(this.input, this.key.bytes());
}else if(this.op == "DEC" ){
this.output =  this.decrypt(this.input, this.key.bytes());
}else{

}

Strings are objects, so this was doing pointer equality.  You really should do 
this.op.equals("ENC").    You were getting lucky with the Java backend because 
Java happens to share String objects between literals in the same class file.  
The Native backend doesn't do this.

I changed to equals and it ran.  Modified version attached.

--dave
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to