Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up workers #3208

Closed
slavonnet opened this issue Feb 27, 2022 · 6 comments
Closed

Speed up workers #3208

slavonnet opened this issue Feb 27, 2022 · 6 comments

Comments

@slavonnet
Copy link
Contributor

Изменения в #3137 можно улучшить так как новый массив всегда больше предыдущего и содержит в себе предыдущий массив плюс обновление. Следовательно Виолейт не нужен, а нужно хранить размер массива и получать/изменять элемент, если индекс в массиве. Если же массив увеличивается ,то значение размера нужно обновлять после изменения переменной.

Changes in #3137 can be improved as the new array is always larger than the previous one and contains the previous array plus the update. Therefore, Vop;ate is not needed, but you need to store the size of the array and get / change the element if the index is in the array. If the array increases, then the size value must be updated after changing the variable.

@dkhalanskyjb
Copy link
Collaborator

volatile нужен, чтобы была гарантия, что когда при копировании происходит присваивание array = newArray, во всех потоках, которые увидели результат этого присваивания, также был видны последствия newArray[i] = curArray[i]. Посмотрите на правила happens-before для Java.

@slavonnet

This comment was marked as off-topic.

@qwwdfsad
Copy link
Member

Once again: this is a public repository with English being its only official language, any other language for communication is not welcomed here. If you do not feel comfortable discussing the matter in English -- feel free to reach maintainers you know can understand you via slack or email.

The goal here is to be open for other folks to participate, express their opinion on implementation, design or any other question.

@qwwdfsad
Copy link
Member

qwwdfsad commented Feb 28, 2022

@slavonnet this is the second time when you are using familiarity and hostility towards maintainers, not talking about the fact that you have been warned about the language.

This won't be tolerated any more -- the very next violation of any basic communication hygiene will result in your ban.

@slavonnet
Copy link
Contributor Author

slavonnet commented Feb 28, 2022

@qwwdfsad You need to be offended when they want to offend you. I didn't try to offend anyone. You have confused the "kitchen talk" narrative style. . In my text there was no appeal to a specific someone, but to a third person (opponent). IDDQD activate and "plus throw" is a good thanks for your participation and willingness to help. No matter how free my style is, the body contains only love and care. I am ready to answer and defend for every word and message, but you will not find the time for this. I don't need an apology if you don't understand your fault.

Fact

  • Freedom of the bastard is one of the main values
  • I did not subscribe to your rules of business correspondence
  • Your freedoms are no more important than mine. The truth is in the middle.
  • In my world, if you do not want to communicate with a person, you need to tell him about it. He will leave. Threats are the path to the dark side.

Resources, finance, subscriptions to products, donations to the android topic and other support are turned off. No negative. Your request is heard, Attitude is now neutral.

"No to cages and restrictions in minds, thoughts, deeds, and the truth."

Nevertheless, with respect and good wishes.

@dkhalanskyjb
Copy link
Collaborator

The fault for using Russian is on me, it was I who initially chose to engage using Russian exclusively. I thought it would be the most efficient way to go in this particular instance. Sorry, my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants