<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>coder . cl &#187; c</title>
	<atom:link href="http://coder.cl/category/programming/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://coder.cl</link>
	<description>web developer &#38; system programmer</description>
	<lastBuildDate>Sat, 04 Feb 2012 12:07:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>what is thread-safe?</title>
		<link>http://coder.cl/2011/11/what-is-thread-safe/</link>
		<comments>http://coder.cl/2011/11/what-is-thread-safe/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 20:51:11 +0000</pubDate>
		<dc:creator>Daniel Molina Wegener</dc:creator>
				<category><![CDATA[c]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://coder.cl/?p=2044</guid>
		<description><![CDATA[What is thread-safe?. Thread-safe implies that for a given resource it will not be used at the same time by two or more threads or processes. By resource, we must understand a memory block or similar kind of resources. If you create a list that is shared between threads to store data, you will need [...]]]></description>
			<content:encoded><![CDATA[<p>What is thread-safe?. Thread-safe implies that for a given resource it will not be used at the same time by two or more threads or processes. By resource, we must understand a memory block or similar kind of resources. If you create a list that is shared between threads to store data, you will need a way to write that list &mdash; appending nodes or removing nodes &mdash; without writing it simultaneously. This implies the usage of thread-safety techniques that will bring you sequential access to the list allowing sequential writes, instead concurrent writes that will probably crash your application.</p>
<p><span id="more-2044"></span></p>
<p>There are various kinds of techniques that can be used to create thread-safe algorithms and data structures. The are two main classes called <i>blocking algorithms</i> and <i>non-blocking algorithms</i>. On a blocking algorithm, locks are used to encapsulate fragments of code where you must not do concurrent writes to avoid racing conditions, where that fragment is called <i>critical section</i>. On non-blocking algorithms, you do not use locks, instead you use atomic operations to switch between the used resources, for example using a technique called <i>compare and swap</i> or <i>CAS</i>.</p>
<p>A racing condition, is an event that occurs when two or more threads are accessing the same resource at the same time, leading to data corruption or system faults. The most classic lock techniques in Java and C, are the <tt>synchronized</tt> keyword on Java and <tt>pthread_mutex_lock()</tt> call in C. On Java we protect our critical section using <tt>synchronized</tt> as follows.</p>
<pre class="brush: java;">
class SingletonSampleImpl extends Object {  

    private static Object singletonMutex = new Object();
    private static SingletonSampleImpl instance = null;  

    public static SingletonSampleImpl getInstance() {
        synchronized (singletonMutex) {
            /* when we instantiate the singleton
               we have a critical section to protect
               from racing conditions */
            if (instance == null) {
                instance = new SingletonSampleImpl();
            }
        }
        return instance;
    }
}
</pre>
<p>The <tt>singletonMutex</tt> object acts as <i>mutex</i>, where a mutex &mdash; term that comes from <i>mutual exclusion</i> &mdash; has a flag that indicates to the other threads if it is blocked or not to jump into the critical section and execute the code. So, a mutex or semaphore is a mere <i>flag</i> that indicates to the program if the resource is busy or not. Using locks or blocking-algorithms is expensive on most systems, depending on how are they used. For example is very expensive to use a blocking algorithm to protect a socket, where it must <i>wait</i> its chance to be written by other threads, with inherent network time wait.</p>
<p>On the non-blocking side, we have three types of algorithms: <i>wait-free</i>, <i>lock-free</i> and <i>obstruction-free</i>. Where wait free is the strongest technique, but the hardest to handle, because once you implement it you have an algorithm that do not <i>waits</i> for writing or reading. Lock-free usually uses CAS, so it using a compare and swap operation to ensure that the critical section is protected, without locking. Obstruction-free uses locking, but a different one called live-locking.</p>
<p>The atomic operations used on the non-blocking techniques usually are operating on a very low level of the processor, because they must executed without the interference of any other threads. For example to work with atomic operations using the GCC compiler we have some <a href='http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Atomic-Builtins.html' title='Built-in functions for atomic memory access'>special extensions to work with them</a>.</p>
<br/><hr height="1px" width="50%" />
<div style='text-align: center !important;'><b>Copyright © 2011 Daniel Molina Wegener</b><br/><b>Atribución-No Comercial-Sin Derivadas 2.0 Chile</b><br/><a target='_new' rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/cl/"><img alt="Creative Commons License" style="border-width:0" src="http://coder.cl.qfl.wpcdn.arcostream.com/cc88x31.png" /></a></div>
<br/><hr height="1px" width="100%" />
<p><small>© Daniel Molina Wegener for <a href="http://coder.cl">coder . cl</a>, 2011. | <a href="http://coder.cl/2011/11/what-is-thread-safe/">Permalink</a> | <a href="http://coder.cl/2011/11/what-is-thread-safe/#comments">No comment</a><br/>Post tags: <br/></small></p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6234432850133541";
/* main-feed */
google_ad_slot = "0763600725";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://coder.cl/2011/11/what-is-thread-safe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>static analysis on c source</title>
		<link>http://coder.cl/2011/08/static-analysis-on-c-source/</link>
		<comments>http://coder.cl/2011/08/static-analysis-on-c-source/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 11:41:17 +0000</pubDate>
		<dc:creator>Daniel Molina Wegener</dc:creator>
				<category><![CDATA[c]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://coder.cl/?p=1758</guid>
		<description><![CDATA[Static analysis is cool, you can find bugs without running your programs or without debugging your programs, doing source code analysis with automated tools that analyzes your code execution path, variables and behaviour doing a static interpretation of your code. The resulting reports of static analysis can guide you to construct better code and correct [...]]]></description>
			<content:encoded><![CDATA[<p>Static analysis is cool, you can find bugs without running your programs or without debugging your programs, doing source code analysis with automated tools that analyzes your code execution path, variables and behaviour doing a static interpretation of your code. The resulting reports of static analysis can guide you to construct better code and correct a wide variety of errors on early stages of your program development, including hardening tasks, creating better programs with early corrections. There are various tools that can check your C source code and make your C programming tasks easier to handle.</p>
<p><span id="more-1758"></span></p>
<blockquote><p>
The sophistication of the analysis performed by tools varies from those that only consider the behaviour of individual statements and declarations, to those that include the complete source code of a program in their analysis. Uses of the information obtained from the analysis vary from highlighting possible coding errors (e.g., the lint tool) to formal methods that mathematically prove properties about a given program (e.g., its behaviour matches that of its specification) [<a href='http://en.wikipedia.org/wiki/Static_program_analysis' title='Static program analysis'>Static program analysis, Wikipedia</a>].
</p></blockquote>
<p>I&#8217;ve created a very simple Python script that wraps the execution of various of those tools to analyze C source code, grouping the execution of <a href='http://www.splint.org/' title='Annotation-Assisted Lightweight Static Checking'>splint static analyzer</a>, <a href='http://en.wikipedia.org/wiki/TenDRA_Compiler' title='TenDRA'>TenDRA static checker</a> and <a href='http://cppcheck.sourceforge.net/' title='cppcheck static checker'>cppcheck static checker</a>. Those tools will allow you to verify your C source code using static analysis, and will allow you to find bugs in your C source code finding patterns of well known programming errors. Along the time, with practice, you will not write the same errors twice, and if you use those tools, you will enhance your programming habits by doing better code, with the assistance of those tools, for example using uninitiated variables or unchecked variables will not be a problem for you.</p>
<p>The tool <i>cppcheck</i> do not requires configuration, you just need to run it using a small set of flags, usually <tt>cppcheck --enable style --enable information --enable unusedFunction</tt>, so you do not require to create a configuration file and those tests made by cppcheck are very lightweight. The TenDRA compile just checks for standard conformance, and common flags in TenDRA are like <tt>tchk -Xs -Yxpg4 -Yposix</tt>. Among those three tools, the most complex one is splint, since it is a guided static analyzer, which uses comments to guide the static analyzer on program analysis. It requires a configuration file, that is called <tt>.splintrc</tt> and should be placed in your <tt>$HOME</tt> directory. My <tt>.splintrc</tt> configuration file is as follows:</p>
<pre class="brush: bash;">
##
## .splintrc example file
##

+strict
+matchanyintegral
+trytorecover
+unixlib
-sysdirerrors
-syntax

-bugslimit 50
-sysdirs /usr:/usr/include:/usr/local/include:/usr/include/bits
-DHAVE_CONFIG=1
-DHAVE_CONFIG_H=1
-DNDEBUG=1
-I/usr/include
-I/usr/local/include
-I/opt/include
-I./include
-I../include
-I.
-I..
</pre>
<p>That is a very basic configuration, but is almost complete to allow you to check your C source code. You will find <i>splint</i> reporting errors that your compiler will not display, for example if you are using GCC and your compiler flags are strict, like <tt>-Wall -Wextra -Wshadow -pedantic -std=c99</tt> or <tt>-Wall -Wextra -Wshadow -pedantic -std=c90</tt>, will not report the same errors than splint does. You will find splint as a very strict tool to check your source code, displaying well known bugs, but not all reports should be handled as real, you must think on those errors that really have a real significance.</p>
<p>You can find the bugbuster.py script that I&#8217;ve wrote to use all those tools in one command from Emacs, by running the Emacs <tt>compile</tt> command on its web page <a href='http://coder.cl/products/bugbuster-py/' title='bugbuster.py'>here</a>, and the source code repository to contribute or download the script is located on <a href='https://github.com/dmw/bugbuster' title='bugbuster repository'>github.com here</a>. Enjoy enhancing your source code.</p>
<br/><hr height="1px" width="50%" />
<div style='text-align: center !important;'><b>Copyright © 2011 Daniel Molina Wegener</b><br/><b>Atribución-No Comercial-Sin Derivadas 2.0 Chile</b><br/><a target='_new' rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/cl/"><img alt="Creative Commons License" style="border-width:0" src="http://coder.cl.qfl.wpcdn.arcostream.com/cc88x31.png" /></a></div>
<br/><hr height="1px" width="100%" />
<p><small>© Daniel Molina Wegener for <a href="http://coder.cl">coder . cl</a>, 2011. | <a href="http://coder.cl/2011/08/static-analysis-on-c-source/">Permalink</a> | <a href="http://coder.cl/2011/08/static-analysis-on-c-source/#comments">No comment</a><br/>Post tags: <br/></small></p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6234432850133541";
/* main-feed */
google_ad_slot = "0763600725";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://coder.cl/2011/08/static-analysis-on-c-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ann] pyxser-1.5.2-r2.win32 was released</title>
		<link>http://coder.cl/2011/03/ann-pyxser-1-5-2-r2-win32-was-released/</link>
		<comments>http://coder.cl/2011/03/ann-pyxser-1-5-2-r2-win32-was-released/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 17:55:47 +0000</pubDate>
		<dc:creator>Daniel Molina Wegener</dc:creator>
				<category><![CDATA[c]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[pyxser]]></category>

		<guid isPermaLink="false">http://coder.cl/?p=1397</guid>
		<description><![CDATA[Dear pyxser users, I&#8217;m pleased to announce that I have released pyxser-1.5.2r-r2.win32. This is the same release as 1.5.2-r2, but for Win32 platform. It does not add new features or similar stuff, it&#8217;s just a compiled binary distribution for Windows machines. You can download this release build for Python 2.7 and Win32 machines on SourceForge. [...]]]></description>
			<content:encoded><![CDATA[<p>Dear <a href="http://coder.cl/products/pyxser/">pyxser</a> users, I&#8217;m pleased to announce that I have released <b>pyxser-1.5.2r-r2.win32</b>. This is the same release as 1.5.2-r2, but for Win32 platform. It does not add new features or similar stuff, it&#8217;s just a compiled binary distribution for Windows machines. You can download this release build for Python 2.7 and Win32 machines on SourceForge. Please follow the following link to download the <a href='https://sourceforge.net/projects/pyxser/files/pyxser-1.5.2-r2/'>pyxser-1.5.2-r2.win32</a> package. It uses the Windows Installer and it&#8217;s an executable. You just need to download an official Python 2.7 distribution to use this release.</p>
<p><span id="more-1397"></span></p>
<p>Some notes on performance. Windows has a very poor performance compared to Linux and FreeBSD platforms. Please check the following plot that compares the performance on Windows, Linux and FreeBSD:</p>
<div class="figure">
<a href='http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2011/03/profile-1.5.2.png?v=4.0' title='Compare pyxser-1.5.2 on Windows, Linux and FreeBSD'><img src='http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2011/03/profile-1.5.2.png?v=4.0' alt='Compare pyxser-1.5.2 on Windows, Linux and FreeBSD' border='0' /></a></p>
<div>Compare pyxser-1.5.2 on Windows, Linux and FreeBSD</div>
</div>
<p>The performance on Windows is very poor. The effort required to migrate the source from POSIX platforms to Windows platforms is minimum. The difference the major effort was made on porting the setup script. My code is almost standard and it requires a C99 compiler, and usually I use the flags <tt>-Wall -Wextra -Wshadow -pedantic -std=c99</tt> to compile my sources, so I&#8217;m using very strict dialect. Seems that the Windows C compiler is C90 by default. No way to deal with the Windows compiler for some C keywords. I&#8217;m expecting to bring constant support for Win32 platform on future releases. I will be waiting your feedback :)</p>
<p>Some notes on the FreeBSD install, is the fact that it is a standard distribution, without kernel optimization and it is using distribution binaries &mdash; that means that everything is made for 80&#215;386 machines &mdash; and also it does not have any compiler optimization. Also, is well known that FreeBSD default binaries are slow, mainly because it lacks kernel optimization and standard C library optimizations. The libxml2 port on FreeBSD seems to be the problem, since it is not using the jemalloc library, and it is using the internal libxml2 memory allocator.</p>
<br/><hr height="1px" width="50%" />
<div style='text-align: center !important;'><b>Copyright © 2011 Daniel Molina Wegener</b><br/><b>Atribución-No Comercial-Sin Derivadas 2.0 Chile</b><br/><a target='_new' rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/cl/"><img alt="Creative Commons License" style="border-width:0" src="http://coder.cl.qfl.wpcdn.arcostream.com/cc88x31.png" /></a></div>
<br/><hr height="1px" width="100%" />
<p><small>© Daniel Molina Wegener for <a href="http://coder.cl">coder . cl</a>, 2011. | <a href="http://coder.cl/2011/03/ann-pyxser-1-5-2-r2-win32-was-released/">Permalink</a> | <a href="http://coder.cl/2011/03/ann-pyxser-1-5-2-r2-win32-was-released/#comments">One comment</a><br/>Post tags: <br/></small></p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6234432850133541";
/* main-feed */
google_ad_slot = "0763600725";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://coder.cl/2011/03/ann-pyxser-1-5-2-r2-win32-was-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[ann] pyxser-1.5.1r was released</title>
		<link>http://coder.cl/2010/10/ann-pyxser-1-5-1r-was-released/</link>
		<comments>http://coder.cl/2010/10/ann-pyxser-1-5-1r-was-released/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 16:25:47 +0000</pubDate>
		<dc:creator>Daniel Molina Wegener</dc:creator>
				<category><![CDATA[c]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[pyxser]]></category>

		<guid isPermaLink="false">http://coder.cl/?p=980</guid>
		<description><![CDATA[Dear pyxser users, I&#8217;m pleased to announce that I&#8217;ve released pyxser-1.5.1r. This release includes a new argument for deserialization functions, so you can skip the initialization construct by using cinit = False as argument, this improves performance, but leaves uninitiated objects, without calling its default constructor. The ChangeLog for this release is as follows: 1.5.1r [...]]]></description>
			<content:encoded><![CDATA[<p>Dear <a href="http://coder.cl/products/pyxser/"><strong>pyxser</strong></a> users, I&#8217;m pleased to announce that I&#8217;ve released <b>pyxser-1.5.1r</b>. This release includes a new argument for deserialization functions, so you can skip the initialization construct by using <tt>cinit = False</tt> as argument, this improves performance, but leaves uninitiated objects, without calling its default constructor.</p>
<p><span id="more-980"></span></p>
<p>The <i>ChangeLog</i> for this release is as follows:</p>
<pre>
1.5.1r (2010.10.11):

        Daniel Molina Wegener &lt;dmw@coder.cl&gt;

        * On all files: algorithms were optimized, the code
        was flattened applying "The Zen of Python" and the
        performance was enhanced in 10%.

        * Was added the cinit argument to deserialization
        functions, which control whether or not, the default
        constructor is called, instead of creating a raw
        instance of deserialized objects.

        Thanks to pyxser users for their feedback.
</pre>
<p>The <tt>cinit = False</tt> argument makes <strong>pyxser</strong> to skip the default constructor, calling <tt>PyInstance_NewRaw()</tt> instead of the default constructor. This skips the initialization code on the <tt>__init__()</tt> method. The impact on the performance &mdash; if your objects do not require of the default constructor &mdash; is as follows:</p>
<div class="figure">
<a href="http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2010/10/profile-1.5.1-cinit.svg" target="_blank"><img src="http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2010/10/profile-1.5.1-cinit.png" border="0" /></a>
</div>
<p>This enhancement is minimal, but saves time when you work with very simple objects. To take a look on the documentation, the <strong>pyxser</strong> extension is self documented, so you just need to call <tt>pydoc -p8181</tt>, connect your browser to <i>http://localhost:8181/</i> and search for the pyxser extension documentation.</p>
<p>I hope that you will enjoy this release :D</p>
<br/><hr height="1px" width="50%" />
<div style='text-align: center !important;'><b>Copyright © 2010 Daniel Molina Wegener</b><br/><b>Atribución-No Comercial-Sin Derivadas 2.0 Chile</b><br/><a target='_new' rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/cl/"><img alt="Creative Commons License" style="border-width:0" src="http://coder.cl.qfl.wpcdn.arcostream.com/cc88x31.png" /></a></div>
<br/><hr height="1px" width="100%" />
<p><small>© Daniel Molina Wegener for <a href="http://coder.cl">coder . cl</a>, 2010. | <a href="http://coder.cl/2010/10/ann-pyxser-1-5-1r-was-released/">Permalink</a> | <a href="http://coder.cl/2010/10/ann-pyxser-1-5-1r-was-released/#comments">No comment</a><br/>Post tags: <br/></small></p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6234432850133541";
/* main-feed */
google_ad_slot = "0763600725";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://coder.cl/2010/10/ann-pyxser-1-5-1r-was-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ann] pyxser-1.5r is available</title>
		<link>http://coder.cl/2010/08/ann-pyxser-1-5r-available/</link>
		<comments>http://coder.cl/2010/08/ann-pyxser-1-5r-available/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 00:26:59 +0000</pubDate>
		<dc:creator>Daniel Molina Wegener</dc:creator>
				<category><![CDATA[c]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[pyxser]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://coder.cl/?p=892</guid>
		<description><![CDATA[Dear pyxser users, I&#8217;m pleased to announce that I&#8217;ve released pyxser-1.5r. This release has several bug fixes plus enhancements. pyxser now is 15% faster and do not have memory leaks. For people who do know pyxser, it is a Python Object to XML serializer and deserializer. You install pyxser, and you will have functions to [...]]]></description>
			<content:encoded><![CDATA[<p>Dear <a href="http://coder.cl/products/pyxser/">pyxser</a> users, I&#8217;m pleased to announce that I&#8217;ve released <b>pyxser-1.5r</b>. This release has several bug fixes plus enhancements. <strong>pyxser</strong> now is <i>15%</i> faster and do not have memory leaks. For people who do know <strong>pyxser</strong>, it is a <i>Python Object</i> to <i>XML</i> serializer and deserializer. You install pyxser, and you will have functions to convert Python Objects into XML and viceversa, convert that XML back into a <i>Python Object</i>.</p>
<p><span id="more-892"></span></p>
<p>This release is quite special, I&#8217;ve added lazy initialization of some resources, so it runs <i>15%</i> faster, and I&#8217;ve removed all memory leaks, so it just keeps using about <i>65MB</i> of RAM when is doing the <i>1,500,000.00</i> serialization and deserialization test. I&#8217;ve spent more time coding <strong>pyxser</strong> for this release. Just comparing the performance between the older release <i>1.4.6r</i> &mdash; a buggy release &mdash; with the current release <i>1.5r</i> we can see the performance enhancement as follows:</p>
<div class="figure">
<a href='http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2010/08/profile-trunk-1.5r.svg?ver=2.0' target='_blank'><img src='http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2010/08/profile-trunk-1.5r.png?ver=2.0' border='0' /></a>
</div>
<p>The memory usage was reduced, on what <i>object creation</i> refers, but not on certain tasks &mdash; remember that now I&#8217;m using lazy initialization for some resources &mdash; and we can see a very similar to previous releases plot on how the memory is handled:</p>
<div class="figure">
<a href='http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2010/08/profile-memory-1.5r.svg?ver=2.0' target='_blank'><img src='http://coder.cl.qfl.wpcdn.arcostream.com/uploads/2010/08/profile-memory-1.5r.png?ver=2.0' border='0' /></a>
</div>
<p>The <i>memoization</i> has suffered some important changes. Now it uses <a href='http://docs.python.org/c-api/object.html#PyObject_Hash'>PyObject_Hash()</a> as object identification method. It&#8217;s qute slower than past revisions, but still it works faster using lazy initializations. Another important change made to the serialization algorithm, is the fact that now it is skipping <i>callable</i> objects, so function will not be serialized on any manner.</p>
<p>On the distribution now you will find on the <tt>test</tt> <del>folder</del> directory, some interesting tests, such as <i>utf-16</i> encoding test and <i>ascii</i> encoding test. All serializations now are using the Python embeded <i>Unicode</i> codecs for deserialization, that is not the case for serialization, it is using the <i>LibXML2</i> codec, so it can handle more encodings.</p>
<p>I must strongly thank to <strong>pyxser</strong> users for their feedback.</p>
<br/><hr height="1px" width="50%" />
<div style='text-align: center !important;'><b>Copyright © 2010 Daniel Molina Wegener</b><br/><b>Atribución-No Comercial-Sin Derivadas 2.0 Chile</b><br/><a target='_new' rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/cl/"><img alt="Creative Commons License" style="border-width:0" src="http://coder.cl.qfl.wpcdn.arcostream.com/cc88x31.png" /></a></div>
<br/><hr height="1px" width="100%" />
<p><small>© Daniel Molina Wegener for <a href="http://coder.cl">coder . cl</a>, 2010. | <a href="http://coder.cl/2010/08/ann-pyxser-1-5r-available/">Permalink</a> | <a href="http://coder.cl/2010/08/ann-pyxser-1-5r-available/#comments">No comment</a><br/>Post tags: <br/></small></p>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6234432850133541";
/* main-feed */
google_ad_slot = "0763600725";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://coder.cl/2010/08/ann-pyxser-1-5r-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  coder.cl/category/programming/c/feed/ ) in 0.36046 seconds, on Feb 7th, 2012 at 2:46 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 3:46 am UTC -->
