Dear Moosers
As you may know, identity hashes attributed by the virtual machine ranges up to 4096. This may be problematic when storing objects in a dictionary. We often have to deal with high number of entities, and using dictionary is out of question for performance reason. One solution (inspired from Lukas) would be to use the ID that each MooseEntity has instead of the hash.
I will try to see whether hash can be overriden in MooseEntity to return its ID instead. Will let you know.
Cheers, Alexandre
Alex,
You might consider using the Hash analysis tool to see if your new hash function is better.
It's available on the Cincom store (ok... you need to try that in Visualworks...)
cheers Johan
On 24 Jun 2009, at 18:27, Alexandre Bergel wrote:
Dear Moosers
As you may know, identity hashes attributed by the virtual machine ranges up to 4096. This may be problematic when storing objects in a dictionary. We often have to deal with high number of entities, and using dictionary is out of question for performance reason. One solution (inspired from Lukas) would be to use the ID that each MooseEntity has instead of the hash.
I will try to see whether hash can be overriden in MooseEntity to return its ID instead. Will let you know.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
---------------------------- Johan Brichau johan.brichau@uclouvain.be
yes this looks like a good idea. but the hash function should spread well too I guess
On Jun 24, 2009, at 6:27 PM, Alexandre Bergel wrote:
Dear Moosers
As you may know, identity hashes attributed by the virtual machine ranges up to 4096. This may be problematic when storing objects in a dictionary. We often have to deal with high number of entities, and using dictionary is out of question for performance reason. One solution (inspired from Lukas) would be to use the ID that each MooseEntity has instead of the hash.
I will try to see whether hash can be overriden in MooseEntity to return its ID instead. Will let you know.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
I do not know whether the fact that hash values is increasing by 1 for each element is a problem or not. Best is to try. I will give a shoot soon.
Cheers, Alexandre
On 24 Jun 2009, at 22:50, Stéphane Ducasse wrote:
yes this looks like a good idea. but the hash function should spread well too I guess
On Jun 24, 2009, at 6:27 PM, Alexandre Bergel wrote:
Dear Moosers
As you may know, identity hashes attributed by the virtual machine ranges up to 4096. This may be problematic when storing objects in a dictionary. We often have to deal with high number of entities, and using dictionary is out of question for performance reason. One solution (inspired from Lukas) would be to use the ID that each MooseEntity has instead of the hash.
I will try to see whether hash can be overriden in MooseEntity to return its ID instead. Will let you know.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On Jun 25, 2009, at 10:56 AM, Alexandre Bergel wrote:
I do not know whether the fact that hash values is increasing by 1 for each element is a problem or not. Best is to try. I will give a shoot soon.
You might want to use Hashtable from squeaksource, take a look at the wiki page. Could be enough if the number of entities is not too large.
Stephan
Yes this is something on my todo for some times now.
Stef
On Jun 26, 2009, at 8:45 AM, Stephan Eggermont wrote:
On Jun 25, 2009, at 10:56 AM, Alexandre Bergel wrote:
I do not know whether the fact that hash values is increasing by 1 for each element is a problem or not. Best is to try. I will give a shoot soon.
You might want to use Hashtable from squeaksource, take a look at the wiki page. Could be enough if the number of entities is not too large.
Stephan _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Ok, I will check
Cheers, Alexandre
On 26 Jun 2009, at 08:45, Stephan Eggermont wrote:
On Jun 25, 2009, at 10:56 AM, Alexandre Bergel wrote:
I do not know whether the fact that hash values is increasing by 1 for each element is a problem or not. Best is to try. I will give a shoot soon.
You might want to use Hashtable from squeaksource, take a look at the wiki page. Could be enough if the number of entities is not too large.
Stephan _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Apparently, it does not load in Pharo. The code is not closure aware. I will contact Philip and let you know.
Cheers, Alexandre
On 26 Jun 2009, at 08:45, Stephan Eggermont wrote:
On Jun 25, 2009, at 10:56 AM, Alexandre Bergel wrote:
I do not know whether the fact that hash values is increasing by 1 for each element is a problem or not. Best is to try. I will give a shoot soon.
You might want to use Hashtable from squeaksource, take a look at the wiki page. Could be enough if the number of entities is not too large.
Stephan _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
what is the license because it should be MIT and in that case the closure problem should just be a store in a block arg: On Jun 26, 2009, at 1:30 PM, Alexandre Bergel wrote:
Apparently, it does not load in Pharo. The code is not closure aware. I will contact Philip and let you know.
Cheers, Alexandre
On 26 Jun 2009, at 08:45, Stephan Eggermont wrote:
On Jun 25, 2009, at 10:56 AM, Alexandre Bergel wrote:
I do not know whether the fact that hash values is increasing by 1 for each element is a problem or not. Best is to try. I will give a shoot soon.
You might want to use Hashtable from squeaksource, take a look at the wiki page. Could be enough if the number of entities is not too large.
Stephan _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev