Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет nancygold ([info]nancygold)
@ 2024-08-15 17:15:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Настроение: amused
Entry tags:computing

Optimized it a bit...

$ time ./symta.exe -e 'I 0; while I < 1000000000: ++I; say I'
1000000000
No
real    0m 11.70s
user    0m 1.96s
sys     0m 0.00s



If we believe the Anon at https://lj.rossia.org/users/nancygold/192317.html?thread=1546301#t1546301

it is 10 times slower than the compiled code, which I think is near the limit for the interpreted code.


(Читать комментарии) - (Добавить комментарий)


(Анонимно)
2024-08-15 19:27 (ссылка)
It's slower because it's being interpreted, undermining your "it's the limit" argument. See the "-Djava.compiler=NONE" flag. Without the "-Djava.compiler=NONE" flag:

$ time java ArrogantSadkov
1000000000

real 0m0.026s
user 0m0.014s
sys 0m0.013s

(Ответить) (Уровень выше) (Ветвь дискуссии)


(Анонимно)
2024-08-15 19:50 (ссылка)
And the compiler optimized the loop out in this case.

(Ответить) (Уровень выше)


(Читать комментарии) -