I am doing a project of image processing in which i am copying pictures inside a byte[] in c# and matching it with some algorithm. I have placed two options inside by software, so user can select according to his/her memory requirement these are,
1) Stores all images in byte[].
2) Retrieve from Ms access database on run time.
Performance of both are same... So whats the difference. i thought copying them inside memory makes them run much faster then retrieving them again and again from database. Can any one kindly explain.
Images are 200 x 200 , i have core 2 duo cpu 2.2 GHZ , 4GB Ram. and i am comparing pictures bit by bit(Kindly don't tell me its not a proper method :), i know already). And i am measuring the time with the help of watch inside my form. I have 900 pictures and it takes 4 sec in retrieving the correct image, whether i use byte or retrieve through query.
this.image = new byte[2][]; //----------- image is byte[][]
this.image[0] = DI; //-------- DI is byte[]
this.image[1] = LI; //--------- LI is byte