In a population - edit - If you are going to perform this operation only then there are not many options at once Corrected code should be corrected. If you are going to perform this operation multiple times, then you have a few more options. One fundamental problem is that the data for the array Prepaid is not an efficient operation, so you can choose to use alternative data structure. A A double end queue (known as a deck) will be a wonderful data structure for you. You can efficiently add to the beginning or the end, and you can use the data efficiently anywhere in the structure (but you can not combine more effectively than the beginning or the end). The big problem here is that the .NET does not provide the implementation of a deck. You will have to get a third party library with the implementation. Using the list / queue / etc, you can copy by keeping track of "I need the data I need.") And then waiting to complete the data as long as possible , So that you can create as many new ARA as possible and limit the number of copies of existing elements. You also consider whether you can adjust the structure, so that You are adding to the end instead of the beginning (Even if you know that you have to reverse it later). If you are adding a lot in a short time, then this data may be worth saving in the byte [] value in C #, I value
(bytes) In the 0x00 array I think it will need to create a new array and add the contents of the old array. Speed is an important aspect of my application. What is the best way to do this? DSA (Digital Signature Algorithm) parameter is used to store
byte [] The operation will only need to be performed once per time, but the speed is important because I am potentially doing this operation on many different
byte [] s.
byte [] newValues = new byte [values.Length + 1]; New value [0] = 0x00; // Set Prepaid Value Array Copy (value, 0, new value, 1, value); // Copy the old values
linkedlist can effectively prepare the data, but for most tasks it is generally less efficient as it involves a lot of memory allocation / deallocation and it Lose memory space also, so it will be a pure win
list (which is effective By adding the form to end ) and adding it at the end. Depending on your needs, it may also be able to create a class which is a cover for the list and hides the fact that It gets reversed, you can create an indexer which is
I can exit to
mozi-i , etc. It seems as if your data is stored normally, even if the internal
list Really holds the data behind.
Comments
Post a Comment