[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-dev
Subject:    Re: [racket-dev] =?utf-8?q?Performance=3A_bytes-=3Estring/locale?=
From:       Roman Klochkov <kalimehtar () mail ! ru>
Date:       2014-08-02 18:33:07
Message-ID: 1407004387.504020868 () f352 ! i ! mail ! ru
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

 Tested on new racket 6.1
----
$ /usr/racket/bin/racket
Welcome to Racket v6.1.
> (enter! "test.rkt")
cpu time: 3472 real time: 3479 gc time: 44
cpu time: 608 real time: 604 gc time: 8
----
Even worse :-(


Sat, 02 Aug 2014 22:22:22 +0400 от Roman Klochkov <kalimehtar@mail.ru>:
> Tested on Racket 6.0.1
> 
> ----
> (define str (string->bytes/locale "abcdefghабвгде"))
> (time
> (for ([i 1000000])
> (bytes->string/locale str)))
> (time
> (for ([i 1000000])
> (bytes->string/utf-8 str)))
> ---- Windows 7 x32:
> > (enter! "test.rkt")
> cpu time: 859 real time: 908 gc time: 78
> cpu time: 641 real time: 667 gc time: 16 Seems OK
> Linux
> $ uname -a
> Linux veles 3.14-1-686-pae #1 SMP Debian 3.14.12-1 (2014-07-11) i686 GNU/Linux
> $ /usr/racket/bin/racket
> Welcome to Racket v6.0.1.
> > (enter! "test.rkt")
> cpu time: 3072 real time: 3075 gc time: 52
> cpu time: 552 real time: 551 gc time: 8 Locale in both cases utf-8, so \
> bytes->string/utf-8 and bytes->string/locale returns the same, but \
> bytes->string/locale in Linux 6 times slower. Is it fixable?
> 
> -- 
> Roman Klochkov
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev
> 


-- 
Roman Klochkov


[Attachment #5 (text/html)]


<HTML><BODY>Tested on new racket 6.1<br>----<br><p>$ \
/usr/racket/bin/racket<br>Welcome to Racket v6.1.<br>&gt; (enter! "test.rkt")<br>cpu \
time: 3472 real time: 3479 gc time: 44<br>cpu time: 608 real time: 604 gc time: \
8<br>----<br>Even worse :-(</p><br><br><br>Sat, 02 Aug 2014 22:22:22 +0400 от Roman \
Klochkov &lt;kalimehtar@mail.ru&gt;:<br> <blockquote style="border-left:1px solid \
#0857A6; margin:10px; padding:0 0 0 10px;">  <div id="">
	



    









	
	


	
	
	
	
	

	
	

	
	



<div class="js-helper js-readmsg-msg">
	<style type="text/css"></style>
 	<div>
		<base target="_self" href="https://e.mail.ru/">
		
			<div id="style_14070038060000000805_BODY">
Tested on Racket 6.0.1<br><br>----<br><p>(define str (string-&gt;bytes/locale \
"abcdefghабвгде"))<br>(time<br>&nbsp; &nbsp;(for ([i 1000000])<br>&nbsp; &nbsp; \
&nbsp; (bytes-&gt;string/locale str)))</p><p>(time<br>&nbsp; &nbsp;(for ([i \
1000000])<br>&nbsp; &nbsp; &nbsp; (bytes-&gt;string/utf-8 str)))<br>----</p>Windows 7 \
x32:<br><p>&gt; (enter! "test.rkt")<br>cpu time: 859 real time: 908 gc time: \
78<br>cpu time: 641 real time: 667 gc time: 16</p>Seems OK<br>Linux<br><p>$ uname \
-a<br>Linux veles 3.14-1-686-pae #1 SMP Debian 3.14.12-1 (2014-07-11) i686 \
GNU/Linux</p><p>$ /usr/racket/bin/racket<br>Welcome to Racket v6.0.1.<br>&gt; (enter! \
"test.rkt")<br>cpu time: 3072 real time: 3075 gc time: 52<br>cpu time: 552 real time: \
551 gc time: 8</p>Locale in both cases utf-8, so&nbsp;bytes-&gt;string/utf-8 \
and&nbsp;bytes-&gt;string/locale returns the same, but&nbsp;bytes-&gt;string/locale \
in Linux 6 times slower.<br>Is it fixable?<br><br>-- <br>Roman Klochkov

</div>
			<div>_________________________<br>
&nbsp;&nbsp;Racket Developers list:<br>
&nbsp;&nbsp;<a href="http://lists.racket-lang.org/dev" \
target="_blank">http://lists.racket-lang.org/dev</a><br> <br>
</div>
		
		<base target="_self" href="https://e.mail.ru/">
	</div>

	
</div>


</div>
</blockquote>
<br>
<br>-- <br>Roman Klochkov<br></BODY></HTML>



_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic