Questions tagged as 'desempenho'

2
answers

Why do you say that using @ atus to suppress errors is a bad practice?

In PHP, we can suppress errors by using arroba before certain expressions. This can be seen at: # I've seen some hangouts on PHP and staff were criticizing the use of @ in PHP, for the thesis that an error should be han...
asked by 03.09.2015 / 17:17
3
answers

Is there a difference between reporting the size of the loop condition or outside it?

If I have an array or collection in a Arraylist and need to traverse its elements, I occasionally need to make use of loop repetition. Ex: for(int i = 0; i < arrayList.size(); i++){ //iteração... } or in the case of a simple...
asked by 13.09.2016 / 15:45
5
answers

Why is multiplication faster than division?

Bit brushing question, but I was reading an article on javascript that says split is slower than doing multiplication. And for example, I would recommend changing the code below: var resultado = 4/2; by that would be faster. var result...
asked by 28.03.2014 / 13:38
5
answers

Using unused affect performance?

While developing, I saw that in most of my classes contained a certain amount of using that were not being used and I came to doubt the title. Using unused affects the performance of the application in any way? Do you always need to re...
asked by 21.05.2014 / 16:53
2
answers

How does the G1 (Garbage First Collector) work?

In the JEP-248 discussion of the G1 definition ( Garbage First Collector as the default Garbage Collector on Java 9 . In this period, I've been hearing a lot of G1 quotes, but very little material has deeper details or comparisons, for examp...
asked by 25.07.2015 / 05:00
6
answers

How to measure code performance in PHP?

To measure performance and compare two codes in javascript , I do the following in the browser console: // Vamos testar o código 1 console.time('teste1'); for (var i = 0; i++ < 10000;) { $('#table tr').addClass('destaque'); } cons...
asked by 06.01.2014 / 22:08
3
answers

Joining PHP files into one only increases performance?

I have the impression that every time I run the dump-autoload command to generate autoload of classes via composer , a bootstrap/compiled.php file is created. Inside it, there seems to be a tangle of classes and namespaces...
asked by 14.07.2015 / 18:20
3
answers

Why use get and set in Java?

I learned in college a while ago that I should always use getters and setters to access values in an object and I heard it is for security. p> So I ended up always using and seeing other people using, until I started programming Android and I...
asked by 14.11.2014 / 05:55
4
answers

React Native or Ionic?

I need to create an App and would like to know which of your technologies is the most suitable for mobile development today. What is the main difference between ReactNative and Ionic? Which of the technologies is the most performative? W...
asked by 07.12.2016 / 12:36
2
answers

Performance in Java string creation

What is the best way to create Java strings for better performance? Here are two examples of creating strings in Java: Ex. 1: String str = "string"; Ex. 2: String str = new String("string");     
asked by 03.06.2014 / 23:11